If not u can do it using yii’s own access control feature.
Please take a look here
public function filters()
{
return array(
'accessControl', // perform access control for CRUD operations
);
}
public function accessRules()
{
return array(
array('allow',
'actions'=>array('edit'),
'expression'=>'Users::isAllowed()',
),
array('deny', // deny all users
'users'=>array('*'),
),
);
}
isAllowed() is a static moethod in Users class. It returns true ot flase (boolean)
U can write user checking code inside the method. through his id in url.