13 public static function model($className = __CLASS__)
23 return '{{login_attempts}}';
26 public function rules()
29 array(
'attempts',
'default',
'value' => 1),
30 array(
'created, updated',
'default',
'value' => AppHelper::mysqlDate()),
31 array(
'ip, attempts, created, updated',
'required'),
32 array(
'attempts',
'numerical',
'integerOnly' =>
true),
36 public function init()
38 $this->onBeforeSave = array($this,
'updateTimestamp');
41 public function updateTimestamp()
43 $this->updated = AppHelper::mysqlDate();