Browse files

MDL-30528 stop recreating role_assignments on every login attempt for…

… each user

Credit goes to Luis Gustavo Mueller de Alcantara.
  • Loading branch information...
1 parent 5d497d7 commit 046ce3d31ac987993faa6e93c3224d4889f99033 @skodak skodak committed with Sam Hemelryk Dec 3, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 enrol/database/lib.php
View
2 enrol/database/lib.php
@@ -183,7 +183,7 @@ public function sync_user_enrolments($user) {
$existing = array();
foreach ($current as $r) {
- if (in_array($r->id, $roles)) {
+ if (in_array($r->roleid, $roles)) {
$existing[$r->roleid] = $r->roleid;
} else {
role_unassign($r->roleid, $user->id, $context->id, 'enrol_database', $instance->id);

0 comments on commit 046ce3d

Please sign in to comment.