- fixed strlen() to mb_strlen();

This commit is contained in:
Nikita Sinelnikov
2021-09-21 16:20:37 +03:00
parent e8c1497ec4
commit 7aa8efefff
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -350,7 +350,8 @@ function um_submit_form_register( $args ) {
$unique_userID = uniqid();
if ( empty( $user_login ) || strlen( $user_login ) > 30 && ! is_email( $user_login ) ) {
// see dbDelta and WP native DB structure user_login varchar(60)
if ( empty( $user_login ) || mb_strlen( $user_login ) > 60 && ! is_email( $user_login ) ) {
$user_login = 'user' . $unique_userID;
while ( username_exists( $user_login ) ) {
$unique_userID = uniqid();