Notifications
Clear all

wpForo 1.x.x [Solved] How to change DEFAULT password MINIMUM length?

8 Posts
5 Users
2 Likes
4,261 Views
Posts: 11
Topic starter
(@ownedhard)
Eminent Member
Joined: 7 years ago

How i can change DEFAULT password MINIMUM length when user REGISTER?

I use wpforo and userpro.. and userpro password min length = 8, wpforo = 6.. when user have pass with 6 length, userpro behave incorrectly

7 Replies
Robert
Posts: 10503
Admin
(@robert)
Support Team
Joined: 8 years ago

You can change the password min length using this hook code in your current active WordPress theme functions.php file. I set it 3 in the code, you can change it to whatever you want:

add_filter('wpforo_pass_min_length', function ($length){ return 3;} );

How to Easily Add Custom Code in WordPress

3 Replies
(@berndg)
Joined: 5 years ago

Reputable Member
Posts: 241

@robert Hi Robert, quick question: Is this still the current way to set the minimum password length higher?

Thanks for a short "yes" or "no", and thanks for caring.

(@garygordon)
Joined: 3 years ago

Active Member
Posts: 9

@robert If we use this method by changing the code, will our changes be overwritten (or possibly overwritten) when an upgrade / update is released?  Is it possible to have this feature added into the "Settings" area so we can just change this in the WPFORO application instead of having to modify the code (for this purpose) when we want to make a change.  Please let me know.

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10503

@garygordon,

I just updated the solution, please use the new one in the same post.

Posts: 11
Topic starter
(@ownedhard)
Eminent Member
Joined: 7 years ago

thnx!

Posts: 9
(@garygordon)
Active Member
Joined: 3 years ago

@robert Thanks. You provided the following for the minimum length. I was just curious how to additionally set the "max" length for the password.

add_filter('wpforo_pass_min_length', function ($length){ return 3;} );

Please let me know if there's also an option for "max" length?

Gary

1 Reply
Sofy
 Sofy
Admin
(@sofy)
Joined: 6 years ago

Support Team
Posts: 4303

@garygordon,

Use this one: 

add_filter('wpforo_pass_max_length', function ($length){ return 3;} );