Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.8
-
Fix Version/s: 2.0
-
Component/s: Authentication
-
Labels:None
-
Affected Branches:MOODLE_18_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
When using the auth_db_sync_users the suspended users does not get active again.
Issue Links
| This issue has a non-specific relationship to: | ||||
| MDL-13563 | Hiding but not deleting users who are suspended in LDAP |
|
|
|
Solved including this code in moodle/auth/db/auth.php, at line 379:
// and maybe the user was suspended instead of deleted
} elseif ($old_user = get_record('user', 'username', $user->username, 'auth', 'nologin', 'mnethostid', $user->mnethostid)) {
$user->id = $old_user->id;
if (!set_field('user', 'auth', 'db', 'username', $user->username)){ echo "\t"; print_string('auth_dbrevivedusererror', 'auth', array(stripslashes($user->username), $user->id)); echo "\n"; }else{ echo "\t"; print_string('auth_dbreviveduser', 'auth', array(stripslashes($user->username), $user->id)); echo "\n"; }
Maybe it wasn´t the best way to correct this, but it does the job. =)
cya!
Seiti
Note to myself: install diff tools on my mindows env.