How We Can Register New User For Any Appication

hii all,

  i need to know that i develop one application in yii in which i gave all functionality to see user after login but we need another one funtionality is when user is new and he want to register him self and after that all functionality he can see than what to do?

  please reply me in step by step because i am new in yii.

thanks in advance,

jalpa patel

Hi Jalpa,

I think you want to create the session for particular user login and data will be fetch the session id wise.

thanks for give me answer but i can not exactly know the code of session so can you please elaborate the code, so that i can understand it easily…

Please read this session tutorial

You can write a User Identity in component folder after login,create the session

for e.g

public function authenticate()


		$email = $this->username;


		$criteria = new CDbCriteria();

		$criteria->condition  = ' t.user_type IN(\'user\',\'blogger\',\'company\') AND \''.$email.'\' AND  t.`password` = \''.$password.'\' AND  t.`status` = "1"';

		$vkuser = VkUsers::model()->find($criteria);




		if($vkuser===null) {


		} else if(Yii::app()->getModule('vkuser')->encrypting($this->password)!==$vkuser->password) {


		} else if($vkuser->status>1&&Yii::app()->getModule('vkuser')->loginNotActiv==false) {


		} else if($vkuser->status==2) {


		} else {

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

			$this->email	= $vkuser->email;

			$this->username	= $vkuser->email;

			$this->errorCode= self::ERROR_NONE;


			Yii::app()->vkuser->guestName = $vkuser->email;

			$userData = $vkuser->attributes;

			$userData['fname'] = $vkuser->fname;





		return !$this->errorCode;


in this code I create the VKuser module and write the session

$userData = $vkuser->attributes;

 $userData['fname'] = $vkuser->fname;


I hope it;s help.