PHP Class Sentinel\Repositories\User\SentryUserRepository

Inheritance: implements Sentinel\Repositories\User\SentinelUserRepositoryInterface, implements Illuminate\Contracts\Auth\UserProvider
Afficher le fichier Open project: rydurham/sentinel

Protected Properties

Свойство Type Description
$config
$dispatcher
$sentry

Méthodes publiques

Méthode Description
__construct ( Cartalyst\Sentry\Sentry $sentry, Illuminate\Config\Repository $config, Illuminate\Events\Dispatcher $dispatcher ) Construct a new SentryUser Object
activate ( integer $id, string $code ) : boolean Attempt activation for the specified user
all ( ) : Collection Return all the registered users
ban ( integer $id ) : Array Ban a user
changeGroupMemberships ( $userId, $selections ) : Sentinel\DataTransferObjects\BaseResponse Process a change password request.
changePassword ( $data ) : Sentinel\DataTransferObjects\FailureResponse | Sentinel\DataTransferObjects\SuccessResponse Process a password change request
changePasswordWithoutCheck ( $data ) : Sentinel\DataTransferObjects\FailureResponse | Sentinel\DataTransferObjects\SuccessResponse Change a user's password without checking their old password first
destroy ( integer $id ) : Sentinel\DataTransferObjects\BaseResponse Remove the specified resource from storage.
getUser ( ) : user Return the current active user
resend ( Array $data ) : Sentinel\DataTransferObjects\BaseResponse Resend the activation email to the specified email address
resetPassword ( integer $id, string $code, $password ) : Array Process the password reset request
retrieveByCredentials ( array $credentials ) : Illuminate\Auth\UserInterface | null Retrieve a user by the given credentials.
retrieveById ( mixed $identifier ) : Illuminate\Auth\UserInterface | null Retrieve a user by their unique identifier.
retrieveByToken ( mixed $identifier, string $token ) : Illuminate\Auth\UserInterface | null Retrieve a user by by their unique identifier and "remember me" token.
store ( $data ) : Sentinel\DataTransferObjects\BaseResponse Store a newly created user in storage.
suspend ( integer $id ) : Array Suspend a user
triggerPasswordReset ( $email ) : Bool The user has requested a password reset
unBan ( integer $id ) : Array Remove a users' ban
unSuspend ( $id ) : array Remove a users' suspension.
update ( array $data ) : Sentinel\DataTransferObjects\BaseResponse Update the specified resource in storage.
updateRememberToken ( Illuminate\Contracts\Auth\Authenticatable $user, string $token ) : void Update the "remember me" token for the given user in storage.
validateCredentials ( Illuminate\Contracts\Auth\Authenticatable $user, array $credentials ) : boolean Validate a user against the given credentials.
validateResetCode ( $id, $code ) : Sentinel\DataTransferObjects\FailureResponse Validate a password reset link

Method Details

__construct() public méthode

Construct a new SentryUser Object
public __construct ( Cartalyst\Sentry\Sentry $sentry, Illuminate\Config\Repository $config, Illuminate\Events\Dispatcher $dispatcher )
$sentry Cartalyst\Sentry\Sentry
$config Illuminate\Config\Repository
$dispatcher Illuminate\Events\Dispatcher

activate() public méthode

Attempt activation for the specified user
public activate ( integer $id, string $code ) : boolean
$id integer
$code string
Résultat boolean

all() public méthode

Return all the registered users
public all ( ) : Collection
Résultat Collection

ban() public méthode

Ban a user
public ban ( integer $id ) : Array
$id integer
Résultat Array

changeGroupMemberships() public méthode

Process a change password request.
public changeGroupMemberships ( $userId, $selections ) : Sentinel\DataTransferObjects\BaseResponse
Résultat Sentinel\DataTransferObjects\BaseResponse

changePassword() public méthode

Process a password change request
public changePassword ( $data ) : Sentinel\DataTransferObjects\FailureResponse | Sentinel\DataTransferObjects\SuccessResponse
$data
Résultat Sentinel\DataTransferObjects\FailureResponse | Sentinel\DataTransferObjects\SuccessResponse

changePasswordWithoutCheck() public méthode

Change a user's password without checking their old password first
public changePasswordWithoutCheck ( $data ) : Sentinel\DataTransferObjects\FailureResponse | Sentinel\DataTransferObjects\SuccessResponse
$data
Résultat Sentinel\DataTransferObjects\FailureResponse | Sentinel\DataTransferObjects\SuccessResponse

destroy() public méthode

Remove the specified resource from storage.
public destroy ( integer $id ) : Sentinel\DataTransferObjects\BaseResponse
$id integer
Résultat Sentinel\DataTransferObjects\BaseResponse

getUser() public méthode

Return the current active user
public getUser ( ) : user
Résultat user object

resend() public méthode

Resend the activation email to the specified email address
public resend ( Array $data ) : Sentinel\DataTransferObjects\BaseResponse
$data Array
Résultat Sentinel\DataTransferObjects\BaseResponse

resetPassword() public méthode

Process the password reset request
public resetPassword ( integer $id, string $code, $password ) : Array
$id integer
$code string
Résultat Array

retrieveByCredentials() public méthode

Retrieve a user by the given credentials.
public retrieveByCredentials ( array $credentials ) : Illuminate\Auth\UserInterface | null
$credentials array
Résultat Illuminate\Auth\UserInterface | null

retrieveById() public méthode

Retrieve a user by their unique identifier.
public retrieveById ( mixed $identifier ) : Illuminate\Auth\UserInterface | null
$identifier mixed
Résultat Illuminate\Auth\UserInterface | null

retrieveByToken() public méthode

Retrieve a user by by their unique identifier and "remember me" token.
public retrieveByToken ( mixed $identifier, string $token ) : Illuminate\Auth\UserInterface | null
$identifier mixed
$token string
Résultat Illuminate\Auth\UserInterface | null

store() public méthode

Store a newly created user in storage.
public store ( $data ) : Sentinel\DataTransferObjects\BaseResponse
Résultat Sentinel\DataTransferObjects\BaseResponse

suspend() public méthode

Suspend a user
public suspend ( integer $id ) : Array
$id integer
Résultat Array

triggerPasswordReset() public méthode

The user has requested a password reset
public triggerPasswordReset ( $email ) : Bool
Résultat Bool

unBan() public méthode

Remove a users' ban
public unBan ( integer $id ) : Array
$id integer
Résultat Array

unSuspend() public méthode

Remove a users' suspension.
public unSuspend ( $id ) : array
$id
Résultat array [type] [description]

update() public méthode

Update the specified resource in storage.
public update ( array $data ) : Sentinel\DataTransferObjects\BaseResponse
$data array
Résultat Sentinel\DataTransferObjects\BaseResponse

updateRememberToken() public méthode

Update the "remember me" token for the given user in storage.
public updateRememberToken ( Illuminate\Contracts\Auth\Authenticatable $user, string $token ) : void
$user Illuminate\Contracts\Auth\Authenticatable
$token string
Résultat void

validateCredentials() public méthode

Validate a user against the given credentials.
public validateCredentials ( Illuminate\Contracts\Auth\Authenticatable $user, array $credentials ) : boolean
$user Illuminate\Contracts\Auth\Authenticatable
$credentials array
Résultat boolean

validateResetCode() public méthode

Validate a password reset link
public validateResetCode ( $id, $code ) : Sentinel\DataTransferObjects\FailureResponse
$id
$code
Résultat Sentinel\DataTransferObjects\FailureResponse

Property Details

$config protected_oe property

protected $config

$dispatcher protected_oe property

protected $dispatcher

$sentry protected_oe property

protected $sentry