diff options
author | Evan Prodromou <evan@status.net> | 2010-04-26 02:43:33 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-04-26 02:43:33 -0400 |
commit | 5c05cd2b1a93d360bde7cb7dfc9ba39e5a5a7624 (patch) | |
tree | 5b4092e365023c7729fcdd8260431d3ffb28b519 /plugins/LdapAuthentication | |
parent | 14adb7cc41e3d5d4e543c1f13f7a60d3cadb5c71 (diff) | |
parent | d7d3a50d8751f071aa95541813af1d190e71430e (diff) |
Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x
Diffstat (limited to 'plugins/LdapAuthentication')
-rw-r--r-- | plugins/LdapAuthentication/LdapAuthenticationPlugin.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php index 2e01738ec..0dfc4c63b 100644 --- a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php +++ b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php @@ -96,7 +96,12 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin if($entry){ $registration_data = array(); foreach($this->attributes as $sn_attribute=>$ldap_attribute){ - $registration_data[$sn_attribute]=$entry->getValue($ldap_attribute,'single'); + //ldap won't let us read a user's password, + //and we're going to set the password to a random string later anyways, + //so don't bother trying to read it. + if($sn_attribute != 'password'){ + $registration_data[$sn_attribute]=$entry->getValue($ldap_attribute,'single'); + } } if(isset($registration_data['email']) && !empty($registration_data['email'])){ $registration_data['email_confirmed']=true; |