\User

This is the model class for table "tbl_user".

The followings are the available columns in table 'tbl_user':

Summary

Methods
Properties
Constants
tableName()
rules()
relations()
attributeLabels()
search()
afterSave()
beforeDelete()
model()
checkemail()
$password_repeat
$old_password
$id
$username
$password
$email
SCENARIO_SIGNUP
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

SCENARIO_SIGNUP

SCENARIO_SIGNUP

Properties

$password_repeat

$password_repeat : 

Type

$old_password

$old_password : 

Type

$id

$id : integer

Type

integer

$username

$username : string

Type

string

$password

$password : string

Type

string

$email

$email : string

Type

string

Methods

tableName()

tableName() : string

Returns

string —

the associated database table name

rules()

rules() : array

Returns

array —

validation rules for model attributes.

relations()

relations() : array

Returns

array —

relational rules.

attributeLabels()

attributeLabels() : array

Returns

array —

customized attribute labels (name=>label)

search()

search() : \CActiveDataProvider

Retrieves a list of models based on the current search/filter conditions.

Typical usecase:

  • Initialize the model fields with values from filter form.
  • Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields.
  • Pass data provider to CGridView, CListView or any similar widget.

Returns

\CActiveDataProvider —

the data provider that can return the models based on the search/filter conditions.

afterSave()

afterSave() 

Assign role User to new user

beforeDelete()

beforeDelete() 

Action before data deleting

model()

model(string  $className = __CLASS__) : \User

Returns the static model of the specified AR class.

Please note that you should have this exact method in all your CActiveRecord descendants!

Parameters

string $className

active record class name.

Returns

\User

the static model class

checkemail()

checkemail(  $attribute,   $params) 

Validate email

Parameters

$attribute
$params