PHP Класс Model_A1_User_Sprig

Remember to validate data before saving to database. Some validation rules are already taken care of by the _init() method. 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. If defining logins and last_login fields, add the following to the _init() in the custom user model class: $this->_fields += array( 'logins' => new Sprig_Field_Integer(array( 'default' => 0, 'editable' => FALSE, )), 'last_login' => new Sprig_Field_Integer(array( 'default' => 0, 'editable' => FALSE, )),
Наследование: extends Sprig
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_name Specify config name so password gets hashed correctly (with the right salt pattern) when set in user

Открытые методы

Метод Описание
_init ( ) Set the username, password, and token fields
hash_password ( Validate $array, $field ) : string Hash callback using the A1 library

Описание методов

_init() публичный Метод

Set the username, password, and token fields
public _init ( )

hash_password() публичный Метод

Hash callback using the A1 library
public hash_password ( Validate $array, $field ) : string
$array Validate
Результат string

Описание свойств

$_name защищенное свойство

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