getting errors in Yi

When I used user module for Yii I faced this prob:Fatal error: Call to a member function encrypting() on a non-object in /var/www/Yii/protected/modules/user/components/UserIdentity.php on line 35

I checked everything but did not get any thing.Can some one tell me how to fix this.Please describe it briefly as I am new to Yii.

What’s near line 35 in UserIdentity.php?


public function authenticate()


	{


		if (strpos($this->username,"@")) {


			$user=User::model()->notsafe()->findByAttributes(array('email'=>$this->username));


		} else {


			$user=User::model()->notsafe()->findByAttributes(array('username'=>$this->username));


		}


		if($user===null)


			if (strpos($this->username,"@")) {


				$this->errorCode=self::ERROR_EMAIL_INVALID;


			} else {


				$this->errorCode=self::ERROR_USERNAME_INVALID;


			}


             (line35)////else if(Yii::app()->controller->module->encrypting($this->password)!==$user->password)


			$this->errorCode=self::ERROR_PASSWORD_INVALID;


		else if($user->status==0&&Yii::app()->controller->module->loginNotActiv==false)


			$this->errorCode=self::ERROR_STATUS_NOTACTIV;


		else if($user->status==-1)


			$this->errorCode=self::ERROR_STATUS_BAN;


		else {


			$this->_id=$user->id;


			$this->username=$user->username;


			$this->errorCode=self::ERROR_NONE;


		}


		return !$this->errorCode;


	}

////->it is the line 35.

It looks like that you use the function not in the module user but somewere else.

Be sure that you are not using the default /site/login instead of the module one.

hey thanks zaccaria,I was doing the wrong.I was logging in as a default login and that was showing my prob.Now I can login as a module.Hey can u tell me how to make that as a default one.Pls reply me

Hey ajay, are you using the Yii-user extension? If so, just follow its installation instruction, which is in the very page where it is available for download.