forked from GNUsocial/gnu-social
don't attempt to read a user's ldap password
This commit is contained in:
parent
ffd688b8ef
commit
23bad16bba
@ -96,7 +96,12 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
|
|||||||
if($entry){
|
if($entry){
|
||||||
$registration_data = array();
|
$registration_data = array();
|
||||||
foreach($this->attributes as $sn_attribute=>$ldap_attribute){
|
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'])){
|
if(isset($registration_data['email']) && !empty($registration_data['email'])){
|
||||||
$registration_data['email_confirmed']=true;
|
$registration_data['email_confirmed']=true;
|
||||||
|
Loading…
Reference in New Issue
Block a user