PHP Class Model_Auth_User, php-framework-benchmarks

Inheritance: extends ORM
Afficher le fichier Open project: pmjones/php-framework-benchmarks Class Usage Examples

Protected Properties

Свойство Type Description
$_callbacks Validation callbacks
$_has_many Relationships
$_ignored_columns Columns to ignore
$_labels Field labels
$_rules Validation rules

Méthodes publiques

Méthode Description
change_password ( array &$array, $redirect = FALSE ) : boolean Validates an array for a matching password and password_confirm field, and optionally redirects after a successful save.
complete_login ( ) : void Complete the login for a user by incrementing the logins and saving login timestamp
email_available ( Validate $array, $field ) : void Does the reverse of unique_key_exists() by triggering error if email exists.
login ( array &$array, $redirect = FALSE ) : boolean Validates login information from an array, and optionally redirects after a successful login.
save ( ) : ORM Saves the current object. Will hash password if it was changed.
unique_key ( $value ) : string Allows a model use both email and username as unique identifiers for login
unique_key_exists ( $value, $field = NULL ) : boolean Tests if a unique key value exists in the database.
username_available ( Validate $array, $field ) : void Does the reverse of unique_key_exists() by triggering error if username exists.

Method Details

change_password() public méthode

Validates an array for a matching password and password_confirm field, and optionally redirects after a successful save.
public change_password ( array &$array, $redirect = FALSE ) : boolean
$array array
Résultat boolean

complete_login() public méthode

Complete the login for a user by incrementing the logins and saving login timestamp
public complete_login ( ) : void
Résultat void

email_available() public méthode

Validation callback.
public email_available ( Validate $array, $field ) : void
$array Validate
Résultat void

login() public méthode

Validates login information from an array, and optionally redirects after a successful login.
public login ( array &$array, $redirect = FALSE ) : boolean
$array array
Résultat boolean

save() public méthode

Saves the current object. Will hash password if it was changed.
public save ( ) : ORM
Résultat ORM

unique_key() public méthode

Allows a model use both email and username as unique identifiers for login
public unique_key ( $value ) : string
Résultat string field name

unique_key_exists() public méthode

Tests if a unique key value exists in the database.
public unique_key_exists ( $value, $field = NULL ) : boolean
Résultat boolean

username_available() public méthode

Validation callback.
public username_available ( Validate $array, $field ) : void
$array Validate
Résultat void

Property Details

$_callbacks protected_oe property

Validation callbacks
protected $_callbacks

$_has_many protected_oe property

Relationships
protected $_has_many

$_ignored_columns protected_oe property

Columns to ignore
protected $_ignored_columns

$_labels protected_oe property

Field labels
protected $_labels

$_rules protected_oe property

Validation rules
protected $_rules