class Customer extends Manager

Customer Class

Constants

AUTH_KEY_NAME

Properties

protected $sessionKey
protected User $user from  Manager
protected $model
protected $requireApproval from  Manager
protected bool $useSession from  Manager
protected bool $viaRemember from  Manager

Methods

check()

Determine if the current user is authenticated.

from  Manager
guest()

Determine if the current user is a guest.

from  Manager
user()

Get the currently authenticated user.

from  Manager
int|null
id()

Get the ID for the currently authenticated user.

from  Manager
getUser()

Get the currently authenticated user model.

from  Manager
setUser($user)

Set the current user model

from  Manager
User|bool
authenticate(array $credentials = [], bool $remember = false, bool $login = true)

Validate a user using the given credentials.

from  Manager
bool
once(array $credentials = [])

Log a user into the application without sessions or cookies.

from  Manager
Authenticatable|false
onceUsingId(mixed $id)

Log the given user ID into the application without sessions or cookies.

from  Manager
login(Authenticatable $user, bool $remember = false)

Log a user into the application.

from  Manager
mixed
loginUsingId($id, bool $remember = false)

Log the given user ID into the application.

from  Manager
void
logout()

Log the user out of the application.

from  Manager
bool
viaRemember()

Determine if the user was authenticated via "remember me" cookie.

from  Manager
Authenticatable|User
getById($identifier)

No description

from  Manager
mixed
getByToken($identifier, $token)

No description

from  Manager
null|User
getByCredentials(array $credentials)

No description

from  Manager
validateCredentials(User $user, $credentials)

No description

from  Manager
mixed
createModel()

Create a new instance of the model if it does not already exist.

from  Manager
createModelQuery()

Prepares a query derived from the user model.

from  Manager
void
extendUserQuery(Builder $query)

Extend the query used for finding the user.

string
getModel()

Gets the name of the user model

from  Manager
$this
setModel($model)

Sets the name of the user model

from  Manager
array
getPersistData(Authenticatable|User $user)

Create a new "remember me" token for the user

from  Manager
impersonate(User $user)

Impersonates the given user and sets properties in the session but not the cookie.

from  Manager
stopImpersonate()

No description

from  Manager
isImpersonator()

No description

from  Manager
getImpersonator()

No description

from  Manager
__construct()

No description

customer()

No description

isLogged()

No description

getId()

No description

getName()

No description

getFirstName()

No description

getLastName()

No description

getEmail()

No description

getTelephone()

No description

getAddressId()

No description

getGroupId()

No description

register(array $attributes, bool $activate = false)

Registers a user by giving the required credentials

Details

in Manager at line 50
check()

Determine if the current user is authenticated.

in Manager at line 96
guest()

Determine if the current user is a guest.

in Manager at line 106
User user()

Get the currently authenticated user.

Return Value

User

in Manager at line 119
int|null id()

Get the ID for the currently authenticated user.

Return Value

int|null

in Manager at line 128
User getUser()

Get the currently authenticated user model.

Return Value

User

in Manager at line 138
setUser($user)

Set the current user model

Parameters

$user

in Manager at line 153
User|bool authenticate(array $credentials = [], bool $remember = false, bool $login = true)

Validate a user using the given credentials.

Parameters

array $credentials
bool $remember
bool $login

Return Value

User|bool

Exceptions

Exception

in Manager at line 176
bool once(array $credentials = [])

Log a user into the application without sessions or cookies.

Parameters

array $credentials

Return Value

bool

in Manager at line 193
Authenticatable|false onceUsingId(mixed $id)

Log the given user ID into the application without sessions or cookies.

Parameters

mixed $id

Return Value

Authenticatable|false

in Manager at line 212
login(Authenticatable $user, bool $remember = false)

Log a user into the application.

Parameters

Authenticatable $user
bool $remember

Exceptions

Exception

in Manager at line 247
mixed loginUsingId($id, bool $remember = false)

Log the given user ID into the application.

Parameters

$id
bool $remember

Return Value

mixed

Exceptions

Exception

in Manager at line 262
void logout()

Log the user out of the application.

Return Value

void

in Manager at line 290
bool viaRemember()

Determine if the user was authenticated via "remember me" cookie.

Return Value

bool

in Manager at line 304
Authenticatable|User getById($identifier)

No description

Parameters

$identifier

Return Value

Authenticatable|User

in Manager at line 318
mixed getByToken($identifier, $token)

No description

Parameters

$identifier
$token

Return Value

mixed

Exceptions

Exception

in Manager at line 334
null|User getByCredentials(array $credentials)

No description

Parameters

array $credentials

Return Value

null|User

in Manager at line 350
validateCredentials(User $user, $credentials)

No description

Parameters

User $user
$credentials

in Manager at line 368
mixed createModel()

Create a new instance of the model if it does not already exist.

Return Value

mixed

Exceptions

Exception

in Manager at line 383
protected createModelQuery()

Prepares a query derived from the user model.

at line 96
void extendUserQuery(Builder $query)

Extend the query used for finding the user.

Parameters

Builder $query

Return Value

void

in Manager at line 407
string getModel()

Gets the name of the user model

Return Value

string

in Manager at line 419
$this setModel($model)

Sets the name of the user model

Parameters

$model

Return Value

$this

in Manager at line 432
protected array getPersistData(Authenticatable|User $user)

Create a new "remember me" token for the user

Parameters

Authenticatable|User $user

Return Value

array

in Manager at line 451
impersonate(User $user)

Impersonates the given user and sets properties in the session but not the cookie.

Parameters

User $user

Exceptions

Exception

in Manager at line 464
stopImpersonate()

No description

in Manager at line 480
isImpersonator()

No description

in Manager at line 485
getImpersonator()

No description

at line 16
__construct()

No description

at line 21
customer()

No description

at line 26
isLogged()

No description

at line 31
getId()

No description

at line 36
getName()

No description

at line 41
getFirstName()

No description

at line 46
getLastName()

No description

at line 51
getEmail()

No description

at line 56
getTelephone()

No description

at line 61
getAddressId()

No description

at line 66
getGroupId()

No description

at line 80
Customers_model register(array $attributes, bool $activate = false)

Registers a user by giving the required credentials

Parameters

array $attributes
bool $activate

Return Value

Customers_model

Exceptions

Exception