Yii User Module

Hi i am working on a yii project in which i am using yii user module, i need to make a profile view method inside the user controller for the general audience which is not logged in so that he can view the profile of a specific user, i am making this method inside the User Controller so that the URL becomes

mysite.com/user/user/viewuser/3.

I created a simple method




public function actionViewUser($id){

            echo "hi";

        }



and when i tried to access it via url in the browser it gave me

My Filter and access rules defined in the user controller are as follows




/**

	 * @return array action filters

	 */

	public function filters()

	{

		return CMap::mergeArray(parent::filters(),array(

			'accessControl', // perform access control for CRUD operations

		));

	}

	/**

	 * Specifies the access control rules.

	 * This method is used by the 'accessControl' filter.

	 * @return array access control rules

	 */

	public function accessRules()

	{

		return array(

			array('allow',  // allow all users to perform 'index' and 'view' actions

				'actions'=>array('index','view','viewuser'),

				'users'=>array('*'),

			),

			array('deny',  // deny all users

				'users'=>array('*'),

			),

		);

	}



I am new to Yii , i have developed alot portions till now but this is strange as i have added the name of the newly declared method inside the access rules to allow all users to view this method , but neither the logged or logged out users are able to view this method , and the error is same ,

any help will be appreciated

Regards,

Omer Aslam

Hi

mysite.com/user/user/viewuser/3 (what are the urlmanager rules?)

also check this


public function actionViewUser($id=null){

            echo "hi";

        }