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 the rememberme: See the WordPress documentation for more information

loginUsingId

Log in by the user ID

public function loginUsingId(int $id, bool $remember = false): bool

Properties

login

Login a user

public function login(\WP_User $user, bool $remember = false): bool

Properties

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