Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Modify change passwords requirements( minimum & maximum )
add_action( 'um_change_password_errors_hook','um_081821_change_password_errors_hook', 1 );
function um_081821_change_password_errors_hook( $args ){
if ( strlen( utf8_decode( $args['user_password'] ) ) < 12 ) {
UM()->form()->add_error( 'user_password', __( 'Your password must contain at least 12 characters', 'ultimate-member' ) );
}
if ( strlen( utf8_decode( $args['user_password'] ) ) > 15 ) {
UM()->form()->add_error( 'user_password', __( 'Your password must contain less than 15 characters', 'ultimate-member' ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment