Function Forum_driver_cns->authorise_login
Definitions
sources/forum/cns.php
- Find if the given member ID and password is valid. If username is null, then the member ID is used instead.
- Visibility: public
- 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_raw | string | No | No | required parameter | N/A | N/A | The raw password |
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.
*
* @param ?SHORT_TEXT $username The member username (null: use $member_id)
* @param ?MEMBER $member_id The member ID (null: use $username)
* @param string $password_raw The raw password
* @return array A map of 'id' and 'error'. If 'id' is null, an error occurred and 'error' is set
*/
public function authorise_login(?string $username, ?int $member_id, string $password_raw) : array
* Find if the given member ID and password is valid. If username is null, then the member ID is used instead.
*
* @param ?SHORT_TEXT $username The member username (null: use $member_id)
* @param ?MEMBER $member_id The member ID (null: use $username)
* @param string $password_raw The raw password
* @return array A map of 'id' and 'error'. If 'id' is null, an error occurred and 'error' is set
*/
public function authorise_login(?string $username, ?int $member_id, string $password_raw) : array
