User profile change


I’m making profile change but I have problem. When submit the form, it updates all my columns, not just this, who are in the form.

In the form I just have email, but it updates username, password, etc.

That’s my Profile action

	public function actionProfile()


		$id = (Yii::app()->user->isAdmin() and is_numeric($_GET['id'])) ? $_GET['id'] : Yii::app()->user->id;







			if(isset($_POST['submitUser']) && $user->save())

				Yii::app ()->user->setFlash ( 'user', 'Успешно променихте профила!' );




The second parameter to save is a list of attributes you want to save -

So if you want to save only the email you can use


Wow, thank you and sorry that I’m not looking…