bug#1607669: Validate the results of ldap_search() and ldap_list() when syncing users.
When retrieving data from the LDAP server, check the results retrieved from
ldap_search() and ldap_list(). If there is an error, do not continue.
Otherwise, the sync_users() will assume that zero users were retrieved
from LDAP. It will then deleted or suspended users when
'If a user is no longer present in LDAP' is set to either suspend
users or delete them.
behatnotneeded
Change-Id: Ib57901c61f769d96720cf932d2e0d7f643853a56
(cherry picked from commit 1daee33a1ef67a0e0fc0599c67de08896408519e)
Reviewed: https:/ /reviews. mahara. org/6763 /git.mahara. org/mahara/ mahara/ commit/ 533d0f93cb126f3 a496dd0df30fc64 0a71a3fdc2
Committed: https:/
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.10_STABLE
commit 533d0f93cb126f3 a496dd0df30fc64 0a71a3fdc2
Author: Ghada El-Zoghbi <email address hidden>
Date: Fri Jul 29 18:40:35 2016 +1000
bug#1607669: Validate the results of ldap_search() and ldap_list() when syncing users.
When retrieving data from the LDAP server, check the results retrieved from
ldap_search() and ldap_list(). If there is an error, do not continue.
Otherwise, the sync_users() will assume that zero users were retrieved
from LDAP. It will then deleted or suspended users when
'If a user is no longer present in LDAP' is set to either suspend
users or delete them.
behatnotneeded
Change-Id: Ib57901c61f769d 96720cf932d2e0d 7f643853a56 e0fc0599c67de08 896408519e)
(cherry picked from commit 1daee33a1ef67a0