Jump to content

How to change the minimum length of password?


augustoramos

Recommended Posts

In core/modules/Registration ....

// Check password length

if(strlen($this->post->password1) <= 5)

{

$error = true;

Template::Set('password_error', 'The password is too short!');

}

else

Template::Set('password_error', '');

I haven't had a chance to test changing the above number myself, but I think it's probably a good place to start :)

Link to comment
Share on other sites

Sorry for got to add ....

In lib/js/jquery.pstrength

/**

* $.fn.PStrength.defaults

* These are the default values that can be overidden

*/

$.PStrength.defaults = {

verdicts: ["Very Weak","Weak","Medium","Strong","Very Strong"],

minCharMsg: "The minimum number of characters is",

tooShortMsg: 'Too Short',

unsafeMsg: 'Unsafe Password Word!',

colors: ["#f00","#c06", "#f60","#3c0","#3f0"],

scores: [10,15,30,40],

powMax: 1.4,

common: ["password","sex","god","123456","123","liverpool","letmein","qwerty","monkey"],

minChar: 6,

displayMin: true

Set this min character to the same number you set in my earlier post ..

Link to comment
Share on other sites

sorry about that ..

in admin/modules/PilotAdmin/PilotAdmin.tpl ...

Util::SendEmail($pilot->email, $subject, $message);

# Reject in the end, since it's delted

PilotData::RejectPilot($this->post->id);

}

public function ChangePassword()

{

$password1 = $this->post->password1;

$password2 = $this->post->password2;

// Check password length

if(strlen($password1) <= 5)

{

Template::Set('message', Lang::gs('password.wrong.length'));

Template::Show('core_message.tpl');

return;

}

Change the above password length field to the number in the 2 other files..

Remember.. because these 3 files have been modified, they could get overridden in an update ..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...