October\Rain\Auth\Concerns\HasUser


Public Methods

public createRoleModel()

public createRoleModel(): Models\Role 

createRoleModel creates an instance of the role model.

public createUserModel()

public createUserModel(): void

createUserModel instance

public extendUserQuery()

public extendUserQuery(October\Rain\Database\Builder $query): void

extendUserQuery used for finding the user.

public findUserByCredentials()

public findUserByCredentials(array $credentials): Models\User 

findUserByCredentials finds a user by the given credentials.

public findUserById()

public findUserById(string $id): Authenticatable|null 

findUserById finds a user by the login value.

public findUserByLogin()

public findUserByLogin(string $login): Authenticatable|null 

findUserByLogin finds a user by the login value.

public getUser()

public getUser(): Authenticatable|null 

getUser returns the current user, if any.

public hasRemember()

public hasRemember(): bool 

hasRemember returns true if the user requested to stay logged in.

public hasSession()

public hasSession(): bool 

hasSession returns true if a user session exists without verifying it.

Protected Methods

protected createUserModelQuery()

protected createUserModelQuery(): October\Rain\Database\Builder 

createUserModelQuery prepares a query derived from the user model.

protected validateUserModel()

protected validateUserModel(object $user): bool 

validateUserModel perform additional checks on the user model.