I have a form that to login. I try to customize 2 file:
UserController.php and UserIdentity.php
public function authenticate()
{
$user=User::model()->find('LOWER(email)=?',array(strtolower($this->email)));
if($user===null)
$this->errorCode=self::ERROR_E_INVALID;
else if(md5($this->password)!==$user->password)
// else if(md5(md5($this->password).Yii::app()->params["salt"])!==$user->password)
$this->errorCode=self::ERROR_PASSWORD_INVALID;
else
{
$this->_id=$user->id;
$this->email=$user->email;
$this->errorCode=self::ERROR_NONE;
}
return !$this->errorCode;
}
How create a Login page ?
please help me