Page 1 of 1
[SOLVED] Require longer password upon account creation
Posted: Thu Dec 01, 2011 5:44 pm
by Gefagahaga
Hello all!
I'm new to OC, been fiddling with it for a week or so. Using 1.4.9.5.
My problem is that I feel that the requirement of 3 characters for a password is way too unsafe for customers so I was wondering where I could change this to say 6 or 8 and perhaps also requiring a mix of letters and numbers.
I'm sorry if I'm aksing int he wrong section, don't know where account creation belongs.
Re: Require longer password upon account creation
Posted: Thu Dec 01, 2011 7:03 pm
by fido-x
The validation on customer passwords checks that the password is not less than 4 characters (ie. sets a 4 character minimum) and not greater than 20. So, the password can be from 4 to 20 characters long.
There is nothing stopping you from using a mix of uppercase and lowercase letters and numbers. You can even use some symbols.
Re: Require longer password upon account creation
Posted: Fri Dec 02, 2011 1:17 am
by Gefagahaga
fido-x wrote:The validation on customer passwords checks that the password is not less than 4 characters (ie. sets a 4 character minimum) and not greater than 20. So, the password can be from 4 to 20 characters long.
There is nothing stopping you from using a mix of uppercase and lowercase letters and numbers. You can even use some symbols.
Yes but I wanna force the customers to set a pass with a minimum of say 6 characters and I want it to say that the password is too short if they try setting less than that.
Re: Require longer password upon account creation
Posted: Fri Dec 02, 2011 2:57 am
by SXGuy
catalog/controller/account/register.php
find
Code: Select all
if ((strlen(utf8_decode($this->request->post['password'])) < 4) || (strlen(utf8_decode($this->request->post['password'])) > 20)) {
$this->error['password'] = $this->language->get('error_password');
}
change 4 to 6
i think thats all you need to change. let me know if it works.
Re: Require longer password upon account creation
Posted: Fri Dec 02, 2011 5:34 am
by Gefagahaga
SXGuy wrote:catalog/controller/account/register.php
find
Code: Select all
if ((strlen(utf8_decode($this->request->post['password'])) < 4) || (strlen(utf8_decode($this->request->post['password'])) > 20)) {
$this->error['password'] = $this->language->get('error_password');
}
change 4 to 6
i think thats all you need to change. let me know if it works.
Woo, it does. Thanks a lot!
And if anyone is looking for the same solution, don't forget to change the error text in:
/catalog/language/LANGUAGE/account/create.php
/catalog/language/LANGUAGE/account/password.php
So it says "must be longer than X...."