rando390
Forum Replies Created
-
Figured it out. The “Profile Completeness” field was set as “Required”. Once I unchecked the “Required” button, the profile fields were able to be updated again.
Figured it out
add_action( 'template_redirect', 'redirect_logged_in_users_from_login_page' );function redirect_logged_in_users_from_login_page() {
if ( is_user_logged_in() && is_page( 'login' ) ) {
wp_redirect( um_user_profile_url() );
exit;
}
}Never mind, turns out I’m not so bright. I misunderstood the filter as providing a list of characters it ALLOWED rather than DISALLOWED.
For anyone in the future who can benefit from this, here is the working code.
function my_custom_username_validation_regex( $default_regex ) {
// This regex disallows any character that is not alphanumeric.
$non_alphanumeric_regex = '/[^a-z0-9]/i';
return $non_alphanumeric_regex;
}
add_filter( 'um_validation_safe_username_regex', 'my_custom_username_validation_regex', 10, 1 );- This reply was modified 3 years ago by rando390.