Webmaster's Community

Designing and Development => Open Source => Yii PHP Framework Support => Topic started by: rahul on September 17, 2012, 05:34:35 AM

Title: How to redirect users after login in Yii Framework
Post by: rahul on September 17, 2012, 05:34:35 AM
HI ,
      I am new to yii i install yii on windows to test Yii framework its good also but i have some problem with that
  I want to  redirect my users after login to same place where He/She comes from default ReturnUrl send my user to site\index.php how can i Solve this problem is there any simple way to do that so that i can work further on my project Please Help ..
Title: Re: How to redirect users after login in Yii Framework
Post by: phpdeveloper on September 17, 2012, 12:10:09 PM
you can use urlRefrrer to achieve this like this:
Code: [Select]
$this->redirect(Yii::app()->request->urlReferrer) 

this will take your user back there He/she comes from
                                                                                     
Title: Re: How to redirect users after login in Yii Framework
Post by: perks on September 17, 2012, 12:16:03 PM
HI,
    Can you tell me in wich file i have to made these changes this is what i am looking for
   Thanks in advance 
Title: Re: How to redirect users after login in Yii Framework
Post by: phpdeveloper on September 18, 2012, 05:28:39 AM
You can made these changes in view/layout/main.php