yii Simple user Authentication system you just have to modify the UserIdentity Class. if you want to use md5() method then you can uncomment the md5() option. and and comment the without md5() option. see carefully.
class UserIdentity extends CUserIdentity { /** * Authenticates a user. * The example implementation makes sure if the username and password * are both 'demo'. * In practical applications, this should be changed to authenticate * against some persistent user identity storage (e.g. database). * @return boolean whether authentication succeeds. */ private $id; public function authenticate() { $record=User::model()->findByAttributes(array('username'=>$this->username)); if($record===null) $this->errorCode=self::ERROR_USERNAME_INVALID; else if($record->password!==crypt($this->password,md5(1234)); $this->errorCode=self::ERROR_PASSWORD_INVALID; else { $this->id=$record->id; $this->username = $record->username; $this->errorCode=self::ERROR_NONE; } return !$this->errorCode; } public function getId(){ return $this->id; } }
It’s hard to find your articles in google.
I found it on 22 spot, you should build quality backlinks , it will help you to rank to google top 10.
I know how to help you, just type in google – k2 seo tips
and tricks
LikeLike
thanks a lot Tesha i’ll work on it.
LikeLike