Email is required.
"; }else{ if( is_email( $email ) ){ $prev_email = get_the_author_meta( 'user_email', get_current_user_id() ); if ( $email != $prev_email ): if ( email_exists( $email ) ){ $error .= "Email already exists."; } endif; }else{ $error .= "Email is invalid.
"; } } return $error; } function user_profile_validate_password( $password1, $password2 ){ $error = ""; if ( !empty( $password1 ) ){ if ( strlen( $password1 ) < 4 ){ $error .= "Password must be at least 4 characters.
"; } if ( $password1 != $password2 ){ $error .= 'Passwords do not match.
'; }else{ return 'valid'; } } return $error; } function show_update_profile_action( $msg = "" ){ ?>