validatePassword

Description

Checks that the given password obeys the current forum settings for password strength.

Syntax

void validatePassword (string $username, string $password[, array $restrict_in])



Parameter $username

Expected type: String
Description: The username



Parameter $password

Expected type: String
Description: The password that needs validating



Parameter $restrict_in

Expected type: Array
Description: An array of words that aren't allowed to be in the password (username, email address, etc)


Notes

  • Called when registering/choosing a password.
  • If password checking is enabled, will check that none of the words in restrict_in appear in the password.
  • Returns an error identifier if the password is invalid, or null.
Advertisement: