PHP Class Model_A1_User_Mango
Remember to validate data before saving to database. Some validation rules are already taken care of by the _fields declaration.
Min_length and max_length are set for both username and password, both these fields are already required, and the username
will be checked on uniqueness. However, you might want to add additional rules to validate if username is alphanumeric for example.
Show file
Open project: wouterrr/a1
Protected Properties
Property |
Type |
Description |
|
$_fields |
|
|
|
$_name |
|
Specify config name so password gets hashed correctly (with the right salt pattern) when set in user |
|
Public Methods
Method |
Description |
|
create ( $options = [] ) |
|
|
hash ( $password ) |
|
|
update ( $criteria = [], $options = [] ) |
|
|
Method Details
public create ( $options = [] ) |
public hash ( $password ) |
public update ( $criteria = [], $options = [] ) |
Property Details
$_fields protected property
$_name protected property
Specify config name so password gets hashed correctly (with the right salt pattern) when set in user