User
in package
Tags
Table of Contents
Properties
- $first_name : string
- $full_name : string
- $last_name : string
- $user_id : int
- $username : string
Methods
- __construct() : mixed
- __get() : mixed
- get_latest_messages() : int
- get_new_user_by_id() : array<string|int, mixed>
- get_profile_picture() : string
- set_user() : bool
Properties
$first_name read-only
public
string
$first_name
The first name.
$full_name read-only
public
string
$full_name
The full name. This is a combination of the first and last name.
$last_name read-only
public
string
$last_name
The last name.
$user_id read-only
public
int
$user_id
The user id. Use set_user() to change the user.
$username read-only
public
string
$username
The username.
Methods
__construct()
public
__construct() : mixed
__get()
public
__get(string $name) : mixed
Parameters
- $name : string
Tags
get_latest_messages()
public
get_latest_messages([int $amount = 100 ]) : int
Parameters
- $amount : int = 100
-
(Optional) Amount of messages to get. Default is 100.
Tags
Return values
intget_new_user_by_id()
public
static get_new_user_by_id(int $user_id) : array<string|int, mixed>
Parameters
- $user_id : int
Tags
Return values
array<string|int, mixed>get_profile_picture()
public
get_profile_picture([int $size = 320 ]) : string
Parameters
- $size : int = 320
-
(Optional) Size of the profile picture. Default is 320.
Tags
Return values
stringset_user()
public
set_user(string|int $identifier) : bool
Parameters
- $identifier : string|int
-
Can be a username or a user id.