Function Forum_driver_cns->get_member_from_username
Definitions
sources/forum/cns.php
- Get a member ID from the given member's username. If there is no match and the input is numeric, it will also try it as a member ID.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$username | SHORT_TEXT | No | No | required parameter | N/A | N/A | The username |
Returns
- The member ID (null: not found)
- Type: ?MEMBER
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get a member ID from the given member's username. If there is no match and the input is numeric, it will also try it as a member ID.
*
* @param SHORT_TEXT $username The username
* @return ?MEMBER The member ID (null: not found)
*/
public function get_member_from_username(string $username) : ?int
* Get a member ID from the given member's username. If there is no match and the input is numeric, it will also try it as a member ID.
*
* @param SHORT_TEXT $username The username
* @return ?MEMBER The member ID (null: not found)
*/
public function get_member_from_username(string $username) : ?int