Function Forum_driver_wbb22->_authorise_login

Definitions

sources/forum/wbb22.php

  • Find if the given member ID and password is valid. If username is null, then the member ID is used instead.All authorisation, cookies, and form-logins, are passed through this function.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$username ?SHORT_TEXT No No required parameter N/A N/A The member username (null: use $member_id)
$member_id ?MEMBER No No required parameter N/A N/A The member ID (null: use $username)
$password_mixed string No No required parameter N/A N/A If $cookie_login is true then this is the value of the password cookie, otherwise it's the password the user tried to log in with
$cookie_login boolean No No False N/A N/A Whether this is a cookie login, determines how the hashed password is treated for the value passed in

Returns

  • A map of 'id' and 'error'. If 'id' is null, an error occurred and 'error' is set
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find if the given member ID and password is valid. If username is null, then the member ID is used instead.All authorisation, cookies, and form-logins, are passed through this function.
 *
 * @param  ?SHORT_TEXT $username The member username (null: use $member_id)
 * @param  ?MEMBER $member_id The member ID (null: use $username)
 * @param  string $password_mixed If $cookie_login is true then this is the value of the password cookie, otherwise it's the password the user tried to log in with
 * @param  boolean $cookie_login Whether this is a cookie login, determines how the hashed password is treated for the value passed in
 * @return array A map of 'id' and 'error'. If 'id' is null, an error occurred and 'error' is set
 */

protected function _authorise_login(?string $username, ?int $member_id, string $password_mixed, bool $cookie_login = false) : array