MDL-14543 fixed broken deleting from auth sync
This commit is contained in:
+1
-1
@@ -695,7 +695,7 @@ if ( !is_object($PHPCAS_CLIENT) ) {
|
||||
// find users in DB that aren't in ldap -- to be removed!
|
||||
// this is still not as scalable (but how often do we mass delete?)
|
||||
if (!empty($this->config->removeuser)) {
|
||||
$sql = "SELECT u.id, u.username, u.email
|
||||
$sql = "SELECT u.id, u.username, u.email, u.auth
|
||||
FROM {$CFG->prefix}user u
|
||||
LEFT JOIN $temptable e ON u.username = e.username
|
||||
WHERE u.auth='cas'
|
||||
|
||||
+2
-2
@@ -238,11 +238,11 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
|
||||
// find obsolete users
|
||||
if (count($userlist)) {
|
||||
$sql = "SELECT u.id, u.username, u.email
|
||||
$sql = "SELECT u.id, u.username, u.email, u.auth
|
||||
FROM {$CFG->prefix}user u
|
||||
WHERE u.auth='db' AND u.deleted=0 AND u.username NOT IN ($quoteduserlist)";
|
||||
} else {
|
||||
$sql = "SELECT u.id, u.username, u.email
|
||||
$sql = "SELECT u.id, u.username, u.email, u.auth
|
||||
FROM {$CFG->prefix}user u
|
||||
WHERE u.auth='db' AND u.deleted=0";
|
||||
}
|
||||
|
||||
+1
-1
@@ -643,7 +643,7 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
// find users in DB that aren't in ldap -- to be removed!
|
||||
// this is still not as scalable (but how often do we mass delete?)
|
||||
if (!empty($this->config->removeuser)) {
|
||||
$sql = "SELECT u.id, u.username, u.email
|
||||
$sql = "SELECT u.id, u.username, u.email, u.auth
|
||||
FROM {$CFG->prefix}user u
|
||||
LEFT JOIN $temptable e ON u.username = e.username
|
||||
WHERE u.auth='ldap'
|
||||
|
||||
Reference in New Issue
Block a user