Update 1.1.6

This commit is contained in:
ultimatemember
2015-04-07 20:10:23 +02:00
parent 89722448cb
commit 5e281fbeaf
69 changed files with 820 additions and 222 deletions
+2 -3
View File
@@ -5,7 +5,6 @@ class UM_Validation {
function __construct() {
$this->regex_safe = '/\A[\w\-\.]+\z/';
$this->regex_safe_email = '/\A[\w\-\.\@]+\z/';
$this->regex_phone_number = '/\A[\d\-\.\+\(\)\ ]+\z/';
}
@@ -54,8 +53,8 @@ class UM_Validation {
*** @space, dash, underscore
***/
function safe_username( $string ) {
if ( is_email( $string ) && !preg_match( $this->regex_safe_email, $string ) )
return false;
if ( is_email( $string ) )
return true;
if ( !is_email( $string) && !preg_match( $this->regex_safe, $string ) )
return false;
return true;