Radiate\Auth\AuthManager
Methods
validate
Validate a user's credentials.
public function validate(array $credentials = []): bool
Properties
$credentials
An array containing the keys 'username' and 'password'$credentials = ['username' => '@admin', 'password' => 'P@ssw0rd'];
attempt
Attempt a login
public function attempt(ArrayAccess|array $credentials, bool $remember = false): bool
Properties
$credentials
An array containing the keys 'username' and 'password'$credentials = ['username' => '@admin', 'password' => 'P@ssw0rd'];
$remember
Sets therememberme
: See the WordPress documentation for more information
loginUsingId
Log in by the user ID
public function loginUsingId(int $id, bool $remember = false): bool
Properties
$id
A user ID$remember
Sets therememberme
: See the WordPress documentation for more information
login
Login a user
public function login(\WP_User $user, bool $remember = false): bool
Properties
$user
A WP_User instance$remember
Sets therememberme
: See the WordPress documentation for more information
logout
Log out
public function logout(): void
user
Return the user
public function user(): \WP_User|false
id
Return the user id
public function id(): int|false
check
Determine if the user is logged in
public function check(): bool
guest
Determine if the user is a guest
public function guest(): bool
guard
Return the auth guard
public function guard(): self