Skip to content

Commit

Permalink
Fixed some notices during install
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Aug 14, 2006
1 parent c097419 commit 9db12da
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/accesslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -956,11 +956,7 @@ function assign_capability($capability, $permission, $roleid, $contextid) {
$cap->capability = $capability;
$cap->permission = $permission;
$cap->timemodified = time();
if ($USER->id) {
$cap->modifierid = $USER->id;
} else {
$cap->modifierid = -1; // Happens during fresh install or Moodle.
}
$cap->modifierid = empty($USER->id) ? 0 : $USER->id;

return insert_record('role_capabilities', $cap);
}
Expand Down Expand Up @@ -1048,7 +1044,7 @@ function role_assign($roleid, $userid, $groupid, $contextid, $timestart=0, $time
$ra->timestart = $timestart;
$ra->timeend = $timeend;
$ra->timemodified = time();
$ra->modifier = $USER->id;
$ra->modifier = empty($USER->id) ? 0 : $USER->id;

return insert_record('role_assignments', $ra);

Expand Down

0 comments on commit 9db12da

Please sign in to comment.