Merge pull request #29 from SAHellauer/MOODLE_33PLUS
Added confirmed equal 1 to user creation
This commit is contained in:
commit
c82eb06aea
2 changed files with 3 additions and 0 deletions
1
auth.php
1
auth.php
|
@ -267,6 +267,7 @@ class auth_plugin_userkey extends auth_plugin_base {
|
|||
$user = $data;
|
||||
unset($user['ip']);
|
||||
$user['auth'] = 'userkey';
|
||||
$user['confirmed'] = 1;
|
||||
$user['mnethostid'] = $CFG->mnet_localhost_id;
|
||||
|
||||
$requiredfieds = ['username', 'email', 'firstname', 'lastname'];
|
||||
|
|
|
@ -295,6 +295,7 @@ class auth_plugin_userkey_testcase extends advanced_testcase {
|
|||
$user->email = 'username@test.com';
|
||||
$user->firstname = 'user';
|
||||
$user->lastname = 'name';
|
||||
$user->confirmed = 1;
|
||||
$user->ip = '192.168.1.1';
|
||||
|
||||
$expected = $CFG->wwwroot . '/auth/userkey/login.php?key=FaKeKeyFoRtEsTiNg';
|
||||
|
@ -306,6 +307,7 @@ class auth_plugin_userkey_testcase extends advanced_testcase {
|
|||
$this->assertEquals($user->email, $userrecord->email);
|
||||
$this->assertEquals($user->firstname, $userrecord->firstname);
|
||||
$this->assertEquals($user->lastname, $userrecord->lastname);
|
||||
$this->assertEquals($user->confirmed, $userrecord->confirmed);
|
||||
$this->assertEquals('userkey', $userrecord->auth);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue