PHP Class Gc\User\Model

Inheritance: extends Gc\Db\AbstractTable
Afficher le fichier Open project: gotcms/gotcms Class Usage Examples

Protected Properties

Свойство Type Description
$name string Table name

Méthodes publiques

Méthode Description
authenticate ( string $login, string $password ) : boolean Authenticate user
delete ( ) : boolean Delete user
fromArray ( array $array ) : Model Initiliaze from array
fromId ( integer $userId ) : Model Initiliaze from id
getAcl ( boolean $forceReload = false ) : Model Get User Role
getName ( ) : string Return user name
getRole ( boolean $forceReload = false ) : Model Get User Role
save ( ) : integer Save user
sendForgotPasswordEmail ( string $email ) : boolean Send new password
setEmail ( string $userEmail ) : boolean Set User email
setPassword ( string $userPassword, boolean $encrypt = true ) : void Set user password

Method Details

authenticate() public méthode

Authenticate user
public authenticate ( string $login, string $password ) : boolean
$login string Login
$password string Password
Résultat boolean

delete() public méthode

Delete user
public delete ( ) : boolean
Résultat boolean

fromArray() public static méthode

Initiliaze from array
public static fromArray ( array $array ) : Model
$array array Data
Résultat Model

fromId() public static méthode

Initiliaze from id
public static fromId ( integer $userId ) : Model
$userId integer User id
Résultat Model

getAcl() public méthode

Get User Role
public getAcl ( boolean $forceReload = false ) : Model
$forceReload boolean Force reload
Résultat Gc\User\Role\Model

getName() public méthode

Return user name
public getName ( ) : string
Résultat string

getRole() public méthode

Get User Role
public getRole ( boolean $forceReload = false ) : Model
$forceReload boolean Force reload
Résultat Gc\User\Role\Model

save() public méthode

Save user
public save ( ) : integer
Résultat integer

sendForgotPasswordEmail() public méthode

Send new password
public sendForgotPasswordEmail ( string $email ) : boolean
$email string Email address
Résultat boolean

setEmail() public méthode

Set User email
public setEmail ( string $userEmail ) : boolean
$userEmail string Email address
Résultat boolean

setPassword() public méthode

Set user password
public setPassword ( string $userPassword, boolean $encrypt = true ) : void
$userPassword string User password
$encrypt boolean Encrypt or not the password
Résultat void

Property Details

$name protected_oe property

Table name
protected string $name
Résultat string