Use common_nicknamize() in better places.

This commit is contained in:
Craig Andrews
2010-03-01 11:48:46 -05:00
parent 7410571bda
commit 3bfe3345df
2 changed files with 9 additions and 8 deletions

View File

@@ -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---//