Pass username and nickname to autoregister so auth plugins can set the nickname correct when creating a new user.
Continues fixing what Eric Helgeson pointed out in 01eb4e8f00
This commit is contained in:
@@ -47,10 +47,13 @@ class ReverseUsernameAuthenticationPlugin extends AuthenticationPlugin
|
||||
return $username == strrev($password);
|
||||
}
|
||||
|
||||
function autoRegister($username)
|
||||
function autoRegister($username, $nickname)
|
||||
{
|
||||
if(is_null($nickname)){
|
||||
$nickname = $username;
|
||||
}
|
||||
$registration_data = array();
|
||||
$registration_data['nickname'] = $username ;
|
||||
$registration_data['nickname'] = $nickname ;
|
||||
return User::register($registration_data);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user