Multiple User Sidebar Menu

Hi all,

In my application there are three different user types. These users will be redirected to their own pages after login. The problem is the sidebar each user type uses is different and since column2.php is the file that loads the sidebar I wanted to be able to change that in a way the users will have sidebar menu that corresponds to their type.

I need help in making this work :(

Thanks in advance.

give a condition like this.


$userId		=	Yii::app()->user->getId();

				//check whether job seeker or employeer

				$profile	=	User::model()->findByAttributes(array('id'=>$userId));

				if($profile->profile=='1'){

						//job seeker menu

						

					}else{

						//employeer menu

						

					}

Hi Balu,

thanks for swift and helpful reply.

If you are using CMenu or bootstrap menu there is a ‘visible’ property you can use to show or not show based on role or other attribute.

:)