doing double loop to get sql info
This commit is contained in:
@@ -172,11 +172,11 @@ logger.debug("Finished SQL query for LDAPUsers")
|
||||
# Loop through the ldap users and make sure they are in the sql ldap users table
|
||||
# if they are not in the sql table, insert a new row to add them
|
||||
# if they are disabled in the sql table, enable them
|
||||
set_sqlLDAPusers = set(sqlLDAPusers)
|
||||
for user in ldapUsers:
|
||||
if [item for item in sqlLDAPusers if user.mail in item]:
|
||||
logger.debug("LDAP User {0} is already in the SQL Table".format(user.mail))
|
||||
logger.debug("item {0} is already in the SQL Table".format(item))
|
||||
for ldapUser in ldapUsers:
|
||||
for sqlUser in sqlLDAPusers:
|
||||
if ldapUser.mail in sqlUser:
|
||||
logger.debug("LDAP User {0} is already in the SQL Table".format(user.mail))
|
||||
logger.debug("SQL LDAP User is active: {0}".format(bool(sqlUser[4])))
|
||||
|
||||
#seafileUsers = request('admin/search-user/?query=@johnhgaunt.com', seafileURL, seafileToken)['response']['user_list']
|
||||
#for user in seafileUsers:
|
||||
|
||||
Reference in New Issue
Block a user