summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-11-05 16:53:43 -0500
committerCraig Andrews <candrews@integralblue.com>2009-11-05 16:53:43 -0500
commit1bace8547b0fa3db316ad79e4948869a654b7140 (patch)
treea34ceef8e5bf835482014c1d158ff73b330ab357
parent1845c8c77305e6b3bb64e07aeda4614ccbd09cb2 (diff)
Store the canonical forms of the email address and nickname
-rw-r--r--plugins/Ldap/LdapPlugin.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/Ldap/LdapPlugin.php b/plugins/Ldap/LdapPlugin.php
index 8c2d45b85..cabd3c828 100644
--- a/plugins/Ldap/LdapPlugin.php
+++ b/plugins/Ldap/LdapPlugin.php
@@ -77,7 +77,13 @@ class LdapPlugin extends Plugin
foreach($config_attributes as $config_attribute){
$value = common_config('ldap', $config_attribute.'_attribute');
if($value!==false){
- $registration_data[$config_attribute]=$entry->getValue($value,'single');
+ 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));