PHP Interface Stevemo\Cpanel\User\Repo\CpanelUserInterface

Afficher le fichier Open project: stevemo/cpanel Interface Usage Examples

Méthodes publiques

Méthode Description
activate ( $id ) : boolean Activate a user
authenticate ( array $credentials, boolean $remember = false ) : Cartalyst\Sentry\Users\UserInterface Attempts to authenticate the given user according to the passed credentials.
check ( ) : boolean Check to see if the user is logged in and activated, and hasn't been banned or suspended.
create ( array $credentials, boolean $activate = false ) : Cartalyst\Sentry\Users\UserInterface Create a new user
deactivate ( $id ) : boolean De activate a user
delete ( integer $id ) : void Delete the user
findAll ( ) : array Returns an all users.
findById ( $id ) : Cartalyst\Sentry\Users\UserInterface Finds a user by the given user ID.
findByLogin ( $login ) : Cartalyst\Sentry\Users\UserInterface Find a given user by the login attribute
getEmptyUser ( ) : StdClass Returns an empty user object.
getUser ( ) : mixed | Cartalyst\Sentry\Users\UserInterface Returns the current user being used by Sentry, if any.
getUserThrottle ( $id ) : Cartalyst\Sentry\Throttling\ThrottleInterface Get the throttle provider for a given user
logout ( ) : void Logs the current user out.
register ( array $credentials, boolean $activate = false ) : Cartalyst\Sentry\Users\UserInterface Registers a user by giving the required credentials and an optional flag for whether to activate the user.
resetPassword ( $code, $password ) : Cartalyst\Sentry\Users\UserInterface Reset a given user password
update ( $id, array $attributes ) : Cartalyst\Sentry\Users\UserInterface Update user information
updatePermissions ( integer $id, array $permissions ) : Cartalyst\Sentry\Users\UserInterface Update permissions for a given user
updateThrottleStatus ( $id, $status ) : void

Method Details

activate() public méthode

Activate a user
Author: Steve Montambeault
public activate ( $id ) : boolean
$id
Résultat boolean

authenticate() public méthode

Attempts to authenticate the given user according to the passed credentials.
Author: Steve Montambeault
public authenticate ( array $credentials, boolean $remember = false ) : Cartalyst\Sentry\Users\UserInterface
$credentials array
$remember boolean
Résultat Cartalyst\Sentry\Users\UserInterface

check() public méthode

Check to see if the user is logged in and activated, and hasn't been banned or suspended.
Author: Steve Montambeault
public check ( ) : boolean
Résultat boolean

create() public méthode

Create a new user
Author: Steve Montambeault
public create ( array $credentials, boolean $activate = false ) : Cartalyst\Sentry\Users\UserInterface
$credentials array
$activate boolean
Résultat Cartalyst\Sentry\Users\UserInterface

deactivate() public méthode

De activate a user
Author: Steve Montambeault
public deactivate ( $id ) : boolean
$id
Résultat boolean

delete() public méthode

Delete the user
Author: Steve Montambeault
public delete ( integer $id ) : void
$id integer
Résultat void

findAll() public méthode

Returns an all users.
Author: Steve Montambeault
public findAll ( ) : array
Résultat array

findById() public méthode

Finds a user by the given user ID.
Author: Steve Montambeault
public findById ( $id ) : Cartalyst\Sentry\Users\UserInterface
$id
Résultat Cartalyst\Sentry\Users\UserInterface

findByLogin() public méthode

Find a given user by the login attribute
Author: Steve Montambeault
public findByLogin ( $login ) : Cartalyst\Sentry\Users\UserInterface
$login
Résultat Cartalyst\Sentry\Users\UserInterface

getEmptyUser() public méthode

Returns an empty user object.
Author: Steve Montambeault
public getEmptyUser ( ) : StdClass
Résultat StdClass

getUser() public méthode

Returns the current user being used by Sentry, if any.
Author: Steve Montambeault
public getUser ( ) : mixed | Cartalyst\Sentry\Users\UserInterface
Résultat mixed | Cartalyst\Sentry\Users\UserInterface

getUserThrottle() public méthode

Get the throttle provider for a given user
Author: Steve Montambeault
public getUserThrottle ( $id ) : Cartalyst\Sentry\Throttling\ThrottleInterface
$id
Résultat Cartalyst\Sentry\Throttling\ThrottleInterface

logout() public méthode

Logs the current user out.
Author: Steve Montambeault
public logout ( ) : void
Résultat void

register() public méthode

Registers a user by giving the required credentials and an optional flag for whether to activate the user.
Author: Steve Montambeault
public register ( array $credentials, boolean $activate = false ) : Cartalyst\Sentry\Users\UserInterface
$credentials array
$activate boolean
Résultat Cartalyst\Sentry\Users\UserInterface

resetPassword() public méthode

Reset a given user password
Author: Steve Montambeault
public resetPassword ( $code, $password ) : Cartalyst\Sentry\Users\UserInterface
$code
$password
Résultat Cartalyst\Sentry\Users\UserInterface

update() public méthode

Update user information
Author: Steve Montambeault
public update ( $id, array $attributes ) : Cartalyst\Sentry\Users\UserInterface
$id
$attributes array
Résultat Cartalyst\Sentry\Users\UserInterface

updatePermissions() public méthode

Update permissions for a given user
Author: Steve Montambeault
public updatePermissions ( integer $id, array $permissions ) : Cartalyst\Sentry\Users\UserInterface
$id integer
$permissions array
Résultat Cartalyst\Sentry\Users\UserInterface

updateThrottleStatus() public méthode

Author: Steve Montambeault
public updateThrottleStatus ( $id, $status ) : void
$id
$status
Résultat void