- fixed updating display_name if there is set the User Display Name setting to Default WP Display Name in UM > General > Users > Display name;

- fixed typo in the password validation
This commit is contained in:
Nikita Sinelnikov
2021-09-21 18:26:57 +03:00
parent 7aa8efefff
commit fc92903f97
6 changed files with 104 additions and 10 deletions
+15
View File
@@ -391,5 +391,20 @@ if ( ! class_exists( 'UM_Functions' ) ) {
}
}
/**
* Replace the first match in the string, alternative for the `str_replace()` function
*
* @param string $search
* @param string $replace
* @param string $subject
*
* @return string
*/
function str_replace_first( $search, $replace, $subject ) {
$search = '/' . preg_quote( $search, '/' ) . '/';
return preg_replace( $search, $replace, $subject, 1 );
}
}
}