Skip to content

Commit

Permalink
Merge branch 'MDL-27164-master' of git://github.com/micaherne/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Jan 22, 2013
2 parents cba645b + d6af3d8 commit f6623fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions group/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ function groups_calculate_role_people($rs, $context) {
$roles[$roledata->id] = $roledata;
}
// Record that user has role
$users[$rec->userid]->roles[] = $roles[$rec->roleid];
$users[$rec->userid]->roles[$rec->roleid] = $roles[$rec->roleid];
}
}
$rs->close();
Expand Down Expand Up @@ -925,7 +925,8 @@ function groups_calculate_role_people($rs, $context) {
} else if($rolecount > 1) {
$roleid = '*';
} else {
$roleid = $userdata->roles[0]->id;
$userrole = reset($userdata->roles);
$roleid = $userrole->id;
}
$roles[$roleid]->users[$userid] = $userdata;
}
Expand Down

0 comments on commit f6623fe

Please sign in to comment.