From: Luke Fitzgerald Date: Sun, 20 Jun 2010 14:53:36 +0000 (+0100) Subject: Use built in email verifier X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f37228f413ad85fb30b7c9d4f79827a7fa6d2584;p=quix0rs-gnu-social.git Use built in email verifier --- diff --git a/plugins/Msn/MsnPlugin.php b/plugins/Msn/MsnPlugin.php index acbc6446e0..b62481f761 100644 --- a/plugins/Msn/MsnPlugin.php +++ b/plugins/Msn/MsnPlugin.php @@ -89,12 +89,7 @@ class MsnPlugin extends ImPlugin { * @return boolean */ public function validate($screenname) { - // RFC 2822 (simplified) regexp - 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)) { - return true; - } else { - return false; - } + return Validate::email($screenname, common_config('email', 'check_domain')); } /** diff --git a/plugins/Msn/extlib/phpmsnclass/msn.class.php b/plugins/Msn/extlib/phpmsnclass/msn.class.php index 0435905df4..b809472119 100644 --- a/plugins/Msn/extlib/phpmsnclass/msn.class.php +++ b/plugins/Msn/extlib/phpmsnclass/msn.class.php @@ -871,7 +871,7 @@ class MSN { $this->debug_message("NS: <<< XFR SB"); $user = array_shift($this->waitingForXFR); - $bSBresult = $this->switchboard_control($ip, $port, $cki_code, $User, $Message); + $bSBresult = $this->switchboard_control($ip, $port, $cki_code, $User, $Message); /* $bSBresult = $this->switchboard_control($ip, $port, $cki_code, $aMSNUsers[$nCurrentUser], $sMessage); if ($bSBresult === false) { @@ -904,8 +904,8 @@ class MSN { case 'NLN': // NS: <<< NLN {status} {email} {networkid} {nickname} {clientid} {dpobj} // NS: <<< NLN NLN darkip@inflatablegoldfish.com 1 Luke 2685403136 0 - @list(/* NLN */, $email, $network, $nickname, /* clientid */, /* dbobj */,) = @explode(' ', $data); - $this->callHandler('StatusChange', array('screenname' => $email, 'network' => $network, 'nickname' => $nickname)); + @list(/* NLN */, $status, $email, $network, $nickname, /* clientid */, /* dbobj */,) = @explode(' ', $data); + $this->callHandler('StatusChange', array('screenname' => $email, 'status' => $status, 'network' => $network, 'nickname' => $nickname)); break; case 'OUT':