diff options
author | Sarven Capadisli <csarven@status.net> | 2010-01-31 19:25:49 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@status.net> | 2010-01-31 19:25:49 +0000 |
commit | 339eb1adadc7f3495ad31ef0a5cf20cdca47ce1f (patch) | |
tree | cf3fe727c56b5f8a2c241915dc04abd22d07ac50 /plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php | |
parent | edf99dc45bcb28f60ea260e2a2a1bad148971a97 (diff) | |
parent | bd5278302574ae3af87f09e0d8191c95ab93582a (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php')
-rw-r--r-- | plugins/ReverseUsernameAuthentication/ReverseUsernameAuthenticationPlugin.php | 7 |
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); } |