Use built in email verifier
This commit is contained in:
parent
7a6eb53b79
commit
f37228f413
|
@ -89,12 +89,7 @@ class MsnPlugin extends ImPlugin {
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function validate($screenname) {
|
public function validate($screenname) {
|
||||||
// RFC 2822 (simplified) regexp
|
return Validate::email($screenname, common_config('email', 'check_domain'));
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -904,8 +904,8 @@ class MSN {
|
||||||
case 'NLN':
|
case 'NLN':
|
||||||
// NS: <<< NLN {status} {email} {networkid} {nickname} {clientid} {dpobj}
|
// NS: <<< NLN {status} {email} {networkid} {nickname} {clientid} {dpobj}
|
||||||
// NS: <<< NLN NLN darkip@inflatablegoldfish.com 1 Luke 2685403136 0
|
// NS: <<< NLN NLN darkip@inflatablegoldfish.com 1 Luke 2685403136 0
|
||||||
@list(/* NLN */, $email, $network, $nickname, /* clientid */, /* dbobj */,) = @explode(' ', $data);
|
@list(/* NLN */, $status, $email, $network, $nickname, /* clientid */, /* dbobj */,) = @explode(' ', $data);
|
||||||
$this->callHandler('StatusChange', array('screenname' => $email, 'network' => $network, 'nickname' => $nickname));
|
$this->callHandler('StatusChange', array('screenname' => $email, 'status' => $status, 'network' => $network, 'nickname' => $nickname));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'OUT':
|
case 'OUT':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user