summaryrefslogtreecommitdiff
path: root/plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php')
-rw-r--r--plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php b/plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php
index d9d2137f8..dac5a1588 100644
--- a/plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php
+++ b/plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php
@@ -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);
}