]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Store the canonical forms of the email address and nickname
authorCraig Andrews <candrews@integralblue.com>
Thu, 5 Nov 2009 21:53:43 +0000 (16:53 -0500)
committerCraig Andrews <candrews@integralblue.com>
Thu, 5 Nov 2009 21:53:43 +0000 (16:53 -0500)
plugins/Ldap/LdapPlugin.php

index 8c2d45b8599b6990ca20947182bb813180dc2104..cabd3c82826ebef2e8d3ecdddb59df54a3e45fdf 100644 (file)
@@ -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));