Use built in email verifier

This commit is contained in:
Luke Fitzgerald 2010-06-20 15:53:36 +01:00
parent 7a6eb53b79
commit f37228f413
2 changed files with 4 additions and 9 deletions

View File

@ -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'));
}
/**

View File

@ -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':