Hi @amirulamin950113
Please try this code snippet to change the minimum and maximum requirements:
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' ) );
}
}
You can add the above code to your theme/child-theme’s functions.php file or use the Code Snippets plugin to run the code.
Regards,
Hi @amirulamin950113
Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂
Regards,
Hi.
Just to let you know.
It is work.
Shouldn’t it be better if you put this options in the plugins itself so we can have options to set the value in options?
Thanks
Hi @amirulamin950113
We’ve provided filters and action hooks that are useful to extend and add extra functionalities especially for building small-scale to complex sites.
Regards,
-
This reply was modified 4 years, 9 months ago by
Champ Camba.
I mean in the plugins itself in general settings instead of manual hook in functions.
Is it possible?
Thanks
Hi @amirulamin950113
We’ve got a lot of requests for adding extra settings to UM but we didn’t put them all as it will make the settings long and complex so providing UM hooks will allow developers and users to extend and modify the functionality and features to achieve their goals.
Regards,
-
This reply was modified 4 years, 9 months ago by
Champ Camba.
-
This reply was modified 4 years, 9 months ago by
Champ Camba.
Hi.
Is it possible if at least you put it in the documentation so user will be easy to find a way to do it instead of continous post in the forum.
Right?
Thanks.
Thank you so much.
Now it will be easier for other users to find a way by just reading the documentation.
I hereby confirmed that this issue has been resolved.
Thanks for letting us know.
Regards,