Jump to content
Larry Ullman's Book Forums

Cody

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Cody

  • Rank
    Newbie
  1. Is there a reason why "$model=$this->loadModel($id);" has to go before the checkAccess line or can it go after (as in my example)? I noticed it works both ways. Also, is it a bad idea to redirect users to the home page if they are trying to access a restricted page (as shown below)? public function actionUpdate($id) { // Checks to see if user can update page if (!Yii::app()->user->checkAccess('user_update', array('id'=>$id))){ // Redirects user to home page if denied access $this->redirect(array('site/index')); } $model=$
×
×
  • Create New...