24 lines
357 B
PHP
24 lines
357 B
PHP
|
<?php
|
||
|
|
||
|
class User extends CActiveRecord
|
||
|
{
|
||
|
public static function model($className=__CLASS__)
|
||
|
{
|
||
|
return parent::model($className);
|
||
|
}
|
||
|
|
||
|
public function tableName()
|
||
|
{
|
||
|
return 'tbl_user';
|
||
|
}
|
||
|
|
||
|
public function rules()
|
||
|
{
|
||
|
return array(
|
||
|
array('username, password, email', 'required'),
|
||
|
array('email', 'email'),
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
|