I’m a VERY newbie to YII so please be gentle… I am looking to setup a website so that the first screen that comes up when a user types in the websites URL is the login screen. Once they login and are verified, they then go off to another screen.
The way i currently set it up is in the main.php config file i put this line in:
Then in the SiteController.php file, in the ‘public function actionLogin()’ function, i added this redirect so that the user goes off to the ‘promo’ screen after logged in:
$redirect = $this->redirect(array(‘site/promo’, ‘business’=>$this->$model->businessID));
This all works in that the first screen that comes up is the login screen and the user is then redirected to the promo screen with a variable called ‘business’… unfortunately i can’t seem to populate that variable with a value… Nevertheless, is this the best way to accomplish all of this or is there a better way using beforeAction() of controller or perhaps behaviors???