Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…ak/moodle into MOODLE_22_STABLE
  • Loading branch information...
commit 5dff4c565fe598358f640e127639bec88148377a 2 parents 0ca7b84 + 2824832
Sam Hemelryk samhemelryk authored

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 lib/moodlelib.php
4 lib/moodlelib.php
@@ -3607,7 +3607,8 @@ function create_user_record($username, $password, $auth = 'manual') {
3607 3607 }
3608 3608 $newuser->confirmed = 1;
3609 3609 $newuser->lastip = getremoteaddr();
3610   - $newuser->timemodified = time();
  3610 + $newuser->timecreated = time();
  3611 + $newuser->timemodified = $newuser->timecreated;
3611 3612 $newuser->mnethostid = $CFG->mnet_localhost_id;
3612 3613
3613 3614 $newuser->id = $DB->insert_record('user', $newuser);
@@ -3670,6 +3671,7 @@ function update_user_record($username) {
3670 3671 }
3671 3672 if ($newuser) {
3672 3673 $newuser['id'] = $oldinfo->id;
  3674 + $newuser['timemodified'] = time();
3673 3675 $DB->update_record('user', $newuser);
3674 3676 // fetch full user record for the event, the complete user data contains too much info
3675 3677 // and we want to be consistent with other places that trigger this event

0 comments on commit 5dff4c5

Please sign in to comment.
Something went wrong with that request. Please try again.