Merge branch 'w02_MDL-30717_m21_usercreated' of git://github.com/skodak/moodle into MOODLE_21_STABLE

This commit is contained in:
Sam Hemelryk
2012-01-09 14:02:48 +13:00
+3 -1
View File
@@ -3298,7 +3298,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);
@@ -3361,6 +3362,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