Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
in Q2A Core by
So I want to provide a better security for users. to achieve this I need to ask users to put a Password of at least 6 character and should have at least 1 upper case. How can I do this from Admin Panel.

1 Answer

0 votes

To set the minimum password length you can put this in your qa-config.php file:

define('QA_MIN_PASSWORD_LEN', 8);

However, 8 is already the default in Q2A (since v1.8.0). I'd suggest keeping that and not changing it to 6 as that is less secure.

For changing password requirements you'll need to make a filter plugin with a validate_password function. Something along the lines of

public function validate_password($password, $olduser)
    if (!preg_match('/[A-Z]/', $password)) {
        return 'Password must contain at least 1 uppercase character';