Topic on Manual talk:$wgPasswordPolicy

Changing ordinary user policy

6
Summary by Kghbln

Examples now provided in documentation.

90.177.12.108 (talkcontribs)

I needed to implement password policy for ordinary users having passwords of minimum six characters of length.

In LocalSettings.php: $wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 6;

worked.

If it is incorrect use someone more knowledgeable may correct it.

MGChecker (talkcontribs)

It's completely correct.

Supertin (talkcontribs)

Can someone who understands this setting throw some better documentation (ie - examples) on there? I'm trying to reduce the minimum password length to 5, and the suggested entry above isn't working for me on 1.27.

Kghbln (talkcontribs)

I just added examples. The following setting should however work:

$wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 5;

Dunno why it does not work for you. Are you sure? @Tgr (WMF):?

Tgr (WMF) (talkcontribs)

MinimalPasswordLength defaults to 1 so if you are trying to reduce that either you already have something raising it (possibly overriding your attempt to reduce it), or there is some confusion about what you want to do (e.g. you are trying to change the password length for some non-default user group).

Kghbln (talkcontribs)

Ah, yeah, I could probably have come up with this, too. Sounds reasonable to me. Thanks a lot for your explanation!