Function __global->check_password_complexity

Definitions

sources/password_rules.php

  • Check the complexity of a password.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$password string No No required parameter N/A N/A The password to check
$username string No No required parameter N/A N/A The username that will go with the password (blank: unknown)
$email_address EMAIL No No required parameter N/A N/A The e-mail address that will go with the password (blank: unknown)
$dob ?TIME No No required parameter N/A N/A The date of birth that will go with the password (null: unknown)
$return_errors boolean No No False N/A N/A Whether to return errors instead of dying on them

Returns

  • Error (null: none)
  • Type: ?Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Check the complexity of a password.
 *
 * @param  string $password The password to check
 * @param  string $username The username that will go with the password (blank: unknown)
 * @param  EMAIL $email_address The e-mail address that will go with the password (blank: unknown)
 * @param  ?TIME $dob The date of birth that will go with the password (null: unknown)
 * @param  boolean $return_errors Whether to return errors instead of dying on them
 * @return ?Tempcode Error (null: none)
 */

function check_password_complexity(string $password, string $username, string $email_address, ?int $dob, bool $return_errors = false) : ?object