Month: October 2017

Yii Login Script

[php] class UserIdentity extends CUserIdentity { private $_id; public function authenticate() { $record=Student::model()->findByAttributes(array(‘username’=>$this->username)); if($record===null){ $this->errorCode=self::ERROR_USERNAME_INVALID; }else if(!CPasswordHelper::verifyPassword($this->password,$record->password)){ $this->errorCode=self::ERROR_PASSWORD_INVALID; }else{ $this->_id=$record->id_student; $this->errorCode=self::ERROR_NONE; } return !$this->errorCode; }...

Create Yii theme from scratch

Create Yii theme from scratch Configure Yii Themes in your Application   If you are using Theme then you can the below Syntax Yii::app()->theme->baseUrl include...

Yii Framework – Encapsulation and Inheritance

Yii Framework – Encapsulation and Inheritance Video 2 : Understanding Encapsulation and Inheritance Concepts – Yii Framework for Beginners Encapsulation Wrapping the related member variable...