Merge branch 'w08_MDL-37963_m25_usergen' of git://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2013-02-26 01:25:58 +01:00
commit 64870338c4

View File

@ -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))) {