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.
Inheritance: extends Mango
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

create() public method

public create ( $options = [] )

hash() public method

public hash ( $password )

update() public method

public update ( $criteria = [], $options = [] )

Property Details

$_fields protected property

protected $_fields

$_name protected property

Specify config name so password gets hashed correctly (with the right salt pattern) when set in user
protected $_name