Use built in email verifier
This commit is contained in:
parent
7a6eb53b79
commit
f37228f413
@ -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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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':
|
||||
|
Loading…
Reference in New Issue
Block a user