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
파일 보기 프로젝트 열기: wouterrr/a1 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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