]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Use built in email verifier
authorLuke Fitzgerald <lw.fitzgerald@googlemail.com>
Sun, 20 Jun 2010 14:53:36 +0000 (15:53 +0100)
committerLuke Fitzgerald <lw.fitzgerald@googlemail.com>
Sun, 20 Jun 2010 14:53:36 +0000 (15:53 +0100)
plugins/Msn/MsnPlugin.php
plugins/Msn/extlib/phpmsnclass/msn.class.php

index acbc6446e08945f40d250a3873b22913b0682440..b62481f761b12703e40a2590d4a2167f2c23134a 100644 (file)
@@ -89,12 +89,7 @@ class MsnPlugin extends ImPlugin {
      * @return boolean\r
      */\r
     public function validate($screenname) {\r
-        // RFC 2822 (simplified) regexp\r
-        if(preg_match('/[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i', $screenname)) {\r
-            return true;\r
-        } else {\r
-            return false;\r
-        }\r
+        return Validate::email($screenname, common_config('email', 'check_domain'));\r
     }\r
 \r
     /**\r
index 0435905df43e3114e39892abb7c5e25710b177c4..b8094721192f938c8119f6fa815937391f60f0cc 100644 (file)
@@ -871,7 +871,7 @@ class MSN {
 \r
                 $this->debug_message("NS: <<< XFR SB");\r
                 $user = array_shift($this->waitingForXFR);\r
-                            $bSBresult = $this->switchboard_control($ip, $port, $cki_code, $User, $Message);\r
+                $bSBresult = $this->switchboard_control($ip, $port, $cki_code, $User, $Message);\r
                 /*\r
                  $bSBresult = $this->switchboard_control($ip, $port, $cki_code, $aMSNUsers[$nCurrentUser], $sMessage);\r
                  if ($bSBresult === false) {\r
@@ -904,8 +904,8 @@ class MSN {
             case 'NLN':\r
                 // NS: <<< NLN {status} {email} {networkid} {nickname} {clientid} {dpobj}\r
                 // NS: <<< NLN NLN darkip@inflatablegoldfish.com 1 Luke 2685403136 0\r
-                @list(/* NLN */, $email, $network, $nickname, /* clientid */, /* dbobj */,) = @explode(' ', $data);\r
-                $this->callHandler('StatusChange', array('screenname' => $email, 'network' => $network, 'nickname' => $nickname));\r
+                @list(/* NLN */, $status, $email, $network, $nickname, /* clientid */, /* dbobj */,) = @explode(' ', $data);\r
+                $this->callHandler('StatusChange', array('screenname' => $email, 'status' => $status, 'network' => $network, 'nickname' => $nickname));\r
                 break;\r
             \r
             case 'OUT':\r