mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'w08_MDL-37963_m25_usergen' of git://github.com/skodak/moodle
This commit is contained in:
commit
64870338c4
@ -176,8 +176,12 @@ EOD;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($record['password'])) {
|
||||
$record['password'] = 'lala';
|
||||
if (isset($record['password'])) {
|
||||
$record['password'] = hash_internal_user_password($record['password']);
|
||||
} else {
|
||||
// The auth plugin may not fully support this,
|
||||
// but it is still better/faster than hashing random stuff.
|
||||
$record['password'] = AUTH_PASSWORD_NOT_CACHED;
|
||||
}
|
||||
|
||||
if (!isset($record['email'])) {
|
||||
@ -204,9 +208,6 @@ EOD;
|
||||
$record['timemodified'] = $record['timecreated'];
|
||||
$record['lastip'] = '0.0.0.0';
|
||||
|
||||
// Use fast hash during testing.
|
||||
$record['password'] = hash_internal_user_password($record['password'], true);
|
||||
|
||||
if ($record['deleted']) {
|
||||
$delname = $record['email'].'.'.time();
|
||||
while ($DB->record_exists('user', array('username'=>$delname))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user