From 3bfe3345df1c2faf0288f1b18d205d793e740aae Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Mon, 1 Mar 2010 11:48:46 -0500 Subject: Use common_nicknamize() in better places. --- plugins/LdapAuthentication/LdapAuthenticationPlugin.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/LdapAuthentication') 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---// -- cgit v1.2.3-54-g00ecf