From 73105dc2d181b5b8b847db232f4cefcf88a35391 Mon Sep 17 00:00:00 2001 From: nikitasinelnikov Date: Thu, 15 Apr 2021 14:17:16 +0300 Subject: [PATCH] - fixed #812; - changed version name; --- includes/core/class-validation.php | 5 +++-- readme.txt | 5 +++++ ultimate-member.php | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/includes/core/class-validation.php b/includes/core/class-validation.php index ee3ea7c3..a070a331 100644 --- a/includes/core/class-validation.php +++ b/includes/core/class-validation.php @@ -19,6 +19,7 @@ if ( ! class_exists( 'um\core\Validation' ) ) { */ function __construct() { $this->regex_safe = '/\A[\w\-\.]+\z/'; + $this->regex_username_safe = '|[^a-z0-9 _.\-@]|i'; $this->regex_phone_number = '/\A[\d\-\.\+\(\)\ ]+\z/'; @@ -214,12 +215,12 @@ if ( ! class_exists( 'um\core\Validation' ) ) { * } * ?> */ - $regex_safe_username = apply_filters('um_validation_safe_username_regex',$this->regex_safe ); + $regex_safe_username = apply_filters( 'um_validation_safe_username_regex', $this->regex_username_safe ); if ( is_email( $string ) ) { return true; } - if ( ! is_email( $string ) && ! preg_match( $regex_safe_username, $string ) ) { + if ( ! is_email( $string ) && preg_match( $regex_safe_username, $string ) ) { return false; } return true; diff --git a/readme.txt b/readme.txt index 6e131ea8..e1eae596 100644 --- a/readme.txt +++ b/readme.txt @@ -155,6 +155,11 @@ The plugin works with popular caching plugins by automatically excluding Ultimat * To learn more about version 2.1 please see this [docs](https://docs.ultimatemember.com/article/1512-upgrade-2-1-0) * UM2.1+ is a significant update to the Member Directories' code base from 2.0.x. Please make sure you take a full-site backup with restore point before updating the plugin += 2.1.18: May xx, 2021 = + +* Bugfixes: + - Fixed: Regular expression for registration form and username field (added ability to use spaces) (#812) + = 2.1.17: April 14, 2021 = * Enhancements: diff --git a/ultimate-member.php b/ultimate-member.php index 3a43949e..d7e01c27 100644 --- a/ultimate-member.php +++ b/ultimate-member.php @@ -3,7 +3,7 @@ Plugin Name: Ultimate Member Plugin URI: http://ultimatemember.com/ Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress -Version: 2.1.17 +Version: 2.1.18-alpha Author: Ultimate Member Author URI: http://ultimatemember.com/ Text Domain: ultimate-member