forked from GNUsocial/gnu-social
Store the canonical forms of the email address and nickname
This commit is contained in:
parent
1845c8c773
commit
1bace8547b
@ -77,9 +77,15 @@ class LdapPlugin extends Plugin
|
||||
foreach($config_attributes as $config_attribute){
|
||||
$value = common_config('ldap', $config_attribute.'_attribute');
|
||||
if($value!==false){
|
||||
if($config_attribute=='email'){
|
||||
$registration_data[$config_attribute]=common_canonical_email($entry->getValue($value,'single'));
|
||||
}else if($config_attribute=='nickname'){
|
||||
$registration_data[$config_attribute]=common_canonical_nickname($entry->getValue($value,'single'));
|
||||
}else{
|
||||
$registration_data[$config_attribute]=$entry->getValue($value,'single');
|
||||
}
|
||||
}
|
||||
}
|
||||
//error_log(print_r($registration_data,1));
|
||||
$user = User::register($registration_data);
|
||||
//prevent other handlers from running, as we have registered the user
|
||||
|
Loading…
Reference in New Issue
Block a user