diff options
author | Craig Andrews <candrews@integralblue.com> | 2010-03-01 11:48:46 -0500 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2010-03-01 11:56:07 -0500 |
commit | 3bfe3345df1c2faf0288f1b18d205d793e740aae (patch) | |
tree | b81c92ee16671cfd81576b92f947a16f97cdc0f3 /plugins/LdapAuthentication | |
parent | 7410571bda4bc584408f6c575b1dbe9f50822e3d (diff) |
Use common_nicknamize() in better places.
Diffstat (limited to 'plugins/LdapAuthentication')
-rw-r--r-- | plugins/LdapAuthentication/LdapAuthenticationPlugin.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php index d6a945f49..e0fd615dd 100644 --- a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php +++ b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php @@ -189,15 +189,14 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin $entry = $this->ldap_get_user($username, $this->attributes); if(!$entry){ //this really shouldn't happen - return $username; + $nickname = $username; }else{ $nickname = $entry->getValue($this->attributes['nickname'],'single'); - if($nickname){ - return $nickname; - }else{ - return $username; + if(!$nickname){ + $nickname = $username; } } + return common_nicknamize($nickname); } //---utility functions---// |