Author Topic: How to redirect users after login in Yii Framework  (Read 17647 times)

rahul

  • Newbie
  • *
  • Posts: 16
How to redirect users after login in Yii Framework
« 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 ..

phpdeveloper

  • Newbie
  • *
  • Posts: 39
Re: How to redirect users after login in Yii Framework
« Reply #1 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
                                                                                     

perks

  • Newbie
  • *
  • Posts: 11
Re: How to redirect users after login in Yii Framework
« Reply #2 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 

phpdeveloper

  • Newbie
  • *
  • Posts: 39
Re: How to redirect users after login in Yii Framework
« Reply #3 on: September 18, 2012, 05:28:39 AM »
You can made these changes in view/layout/main.php

 

X

Do you know?

IfandBut.com helps you to keep yourself updated with latest internet business trends.
Join Now!
anything