mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
Merge branch 'w02_MDL-30717_m23_usercreated' of git://github.com/skodak/moodle
This commit is contained in:
commit
0e743da2b4
1 changed files with 3 additions and 1 deletions
|
@ -3607,7 +3607,8 @@ function create_user_record($username, $password, $auth = 'manual') {
|
||||||
}
|
}
|
||||||
$newuser->confirmed = 1;
|
$newuser->confirmed = 1;
|
||||||
$newuser->lastip = getremoteaddr();
|
$newuser->lastip = getremoteaddr();
|
||||||
$newuser->timemodified = time();
|
$newuser->timecreated = time();
|
||||||
|
$newuser->timemodified = $newuser->timecreated;
|
||||||
$newuser->mnethostid = $CFG->mnet_localhost_id;
|
$newuser->mnethostid = $CFG->mnet_localhost_id;
|
||||||
|
|
||||||
$newuser->id = $DB->insert_record('user', $newuser);
|
$newuser->id = $DB->insert_record('user', $newuser);
|
||||||
|
@ -3670,6 +3671,7 @@ function update_user_record($username) {
|
||||||
}
|
}
|
||||||
if ($newuser) {
|
if ($newuser) {
|
||||||
$newuser['id'] = $oldinfo->id;
|
$newuser['id'] = $oldinfo->id;
|
||||||
|
$newuser['timemodified'] = time();
|
||||||
$DB->update_record('user', $newuser);
|
$DB->update_record('user', $newuser);
|
||||||
// fetch full user record for the event, the complete user data contains too much info
|
// 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
|
// and we want to be consistent with other places that trigger this event
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue