Notifications
Clear all

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

8 Posts
5 Users
2 Reactions
4,538 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: 10589
Admin
(@robert)
Support Team
Joined: 9 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: 6 years ago

Reputable Member
Posts: 243

@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: 4 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: 9 years ago

Support Team
Posts: 10589

@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: 4 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: 7 years ago

Support Team
Posts: 4689

@garygordon,

Use this one:Β 

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