Fixed bug 1801
Untested on mysql, but should work with out problems.
This commit is contained in:
+13
-1
@@ -563,7 +563,19 @@ function main_upgrade($oldversion=0) {
|
||||
execute_sql("UPDATE {$CFG->prefix}user SET auth = '$CFG->auth' WHERE id NOT IN ($adminlist)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($oldversion < 2004082600) {
|
||||
//update auth-fields for external users
|
||||
include_once ($CFG->dirroot."/auth/".$CFG->auth."/lib.php");
|
||||
if (function_exists('auth_get_userlist')) {
|
||||
$externalusers = auth_get_userlist();
|
||||
if (!empty($externalusers)){
|
||||
$externalusers = '\''. implode('\',\'',$externalusers).'\'';
|
||||
execute_sql("UPDATE {$CFG->prefix}user SET auth = '$CFG->auth' WHERE username IN ($externalusers)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user