Tuesday, July 16, 2013

redirect 403 page yii authorized to perform this action


  if($model->id != Yii::app()->user->id)
                    
                {
                    if(!Yii::app()->user->isAdmin())                                     {
                 throw new CHttpException(403,'You are not authorized to perform this action.');
                    }
               

                }

No comments:

Post a Comment