Function __global->check_maintenance_password

Definitions

sources/crypt_maintenance.php

  • Check the given plain-text maintenance password is valid.This should be handled appropriately in an if guard if $silent_failure could be true.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$password_given SHORT_TEXT No No required parameter N/A N/A Given maintenance password
$silent_failure boolean No No False N/A N/A Whether to proceed without exiting if the password was wrong

Returns

  • Whether the password was valid
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Check the given plain-text maintenance password is valid.This should be handled appropriately in an if guard if $silent_failure could be true.
 *
 * @param  SHORT_TEXT $password_given Given maintenance password
 * @param  boolean $silent_failure Whether to proceed without exiting if the password was wrong
 * @return boolean Whether the password was valid
 */

function check_maintenance_password(string $password_given, bool $silent_failure = false) : bool