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