Index: branches/RC/core/units/users/users_config.php =================================================================== diff -u -r11371 -r11375 --- branches/RC/core/units/users/users_config.php (.../users_config.php) (revision 11371) +++ branches/RC/core/units/users/users_config.php (.../users_config.php) (revision 11375) @@ -224,7 +224,7 @@ 'FirstName' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), 'LastName' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), 'Company' => Array('type' => 'string','not_null' => '1','default' => ''), - 'Email' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^[+_a-zA-Z0-9-\.]+@[a-zA-Z0-9-\.]+\.[a-z]{2,4}$/', 'sample_value' => 'email@domain.com', 'unique'=>Array('Email'), 'not_null' => '1', /*'required'=>1, */'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!', 'unique'=>'!lu_email_already_exist!') ), + 'Email' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'unique'=>Array('Email'), 'not_null' => '1', /*'required'=>1, */'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!', 'unique'=>'!lu_email_already_exist!') ), 'CreatedOn' => Array('type'=>'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), 'Phone' => Array('type' => 'string','default' => null), 'Fax' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), Index: branches/RC/core/units/users/users_event_handler.php =================================================================== diff -u -r11355 -r11375 --- branches/RC/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 11355) +++ branches/RC/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 11375) @@ -738,7 +738,7 @@ $object =& $this->Application->recallObject('u', null, Array('skip_autoload' => true)); // TODO: change theme too /* @var $object UsersItem */ - if (preg_match("/^[_a-zA-Z0-9-\.]+@[a-zA-Z0-9-\.]+\.[a-z]{2,4}$/", $friend_email)) + if (preg_match('/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', $friend_email)) { $send_params = array(); $send_params['to_email']=$friend_email; @@ -795,7 +795,7 @@ function OnSubscribeQuery(&$event) { $user_email = $this->Application->GetVar('subscriber_email'); - if (preg_match("/^[_a-zA-Z0-9-\.]+@[a-zA-Z0-9-\.]+\.[a-z]{2,4}$/", $user_email)) { + if (preg_match('/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', $user_email)) { $object =& $this->Application->recallObject($this->Prefix.'.subscriber', null, Array('skip_autoload' => true)); /* @var $object UsersItem */ @@ -833,7 +833,7 @@ /* @var $object UsersItem */ $user_email = $this->Application->RecallVar('SubscriberEmail'); - if (preg_match("/^[_a-zA-Z0-9-\.]+@[a-zA-Z0-9-\.]+\.[a-z]{2,4}$/", $user_email)) { + if (preg_match('/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', $user_email)) { $this->RemoveRequiredFields($object); $object->Load($user_email, 'Email');