Browse files

Merge branch 'w02_MDL-30717_m22_usercreated' of git://github.com/skod…

…ak/moodle into MOODLE_22_STABLE
  • Loading branch information...
2 parents 0ca7b84 + 2824832 commit 5dff4c565fe598358f640e127639bec88148377a Sam Hemelryk committed Jan 9, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/moodlelib.php
View
4 lib/moodlelib.php
@@ -3607,7 +3607,8 @@ function create_user_record($username, $password, $auth = 'manual') {
}
$newuser->confirmed = 1;
$newuser->lastip = getremoteaddr();
- $newuser->timemodified = time();
+ $newuser->timecreated = time();
+ $newuser->timemodified = $newuser->timecreated;
$newuser->mnethostid = $CFG->mnet_localhost_id;
$newuser->id = $DB->insert_record('user', $newuser);
@@ -3670,6 +3671,7 @@ function update_user_record($username) {
}
if ($newuser) {
$newuser['id'] = $oldinfo->id;
+ $newuser['timemodified'] = time();
$DB->update_record('user', $newuser);
// fetch full user record for the event, the complete user data contains too much info
// and we want to be consistent with other places that trigger this event

0 comments on commit 5dff4c5

Please sign in to comment.