简体   繁体   中英

Yii-Eauth redirect after login

Currently once I login using facebook it will redirect me to site/index page .

Ok. Now my question is, If I open page example/view&id=1 and i click the facebook login button, what shall i do in order for the page to redirect back to example/view&id=1 instead of site/index page ?

I found the solution here .

if (Yii::app()->request->urlReferrer != 'http://www.example.com/user/login')
{
    Yii::app()->user->setReturnUrl(Yii::app()->request->urlReferrer);
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM