]> git.mjollnir.org Git - moodle.git/commitdiff
Fix for MDL-12998 and MDL-13079 Ldap not unenrolling users correctly
authordanmarsden <danmarsden>
Mon, 21 Jan 2008 23:22:12 +0000 (23:22 +0000)
committerdanmarsden <danmarsden>
Mon, 21 Jan 2008 23:22:12 +0000 (23:22 +0000)
enrol/ldap/enrol.php

index d5795e3312e6f66e2ad6a69ce989d1e9da1717db..3cc812c2d46800aa286f93b9c002736216d3867c 100755 (executable)
@@ -116,7 +116,7 @@ function setup_enrolments(&$user) {
     foreach ($ldap_assignments as $ra) {
         if($ra->enrol === 'ldap') {
             error_log("Unassigning role_assignment with id '{$ra->id}' from user {$user->id} ({$user->username})");
-            role_unassign($ra->id, $user->id, 0, $ra->contextid, 'ldap');
+            role_unassign($ra->roleid, $user->id, 0, $ra->contextid, 'ldap');
         }
     }