Missing Argument 1 For Mycontroller::loadmodel()


I have problem with passing $id to function loadModel($id), which is executed inside my own filter "filterViewOwn". I have error: Missing argument 1 for PostController::loadModel(). Does anyone can help me? How can i pass this $id? Thanks, greetings.

	public function filters()


		return array( 

                        'viewOwn + view',




	public function filterViewOwn($filterChain)



		// Remove the 'rights' filter if the user is updating an own post

		// and has the permission to do so.

		if(Yii::app()->user->checkAccess('PostViewOwn', array('userid'=>$post->author_id)))




	public function loadModel($id)




			throw new CHttpException(404,'The requested page does not exist.');

		return $model;


Dear Friend

You can get the GET or POST parameters like the following way.




I applied this in CController::accessRule().

It is nice to see that you are applying it in filters.


Many thanks:) You helped me much:) Greetings from Poland:)