aamirkh521 / yii-user

Automatically exported from code.google.com/p/yii-user
0 stars 0 forks source link

Should be fixed in LoginController #59

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In LoginController at line 21 written:
if (strpos(Yii::app()->user->returnUrl,'/index.php')!==false).

I think, that this should be right this:
if (preg_match('/index.php$/', Yii::app()->user->returnUrl)).

This is because when I try to get page under authorization, I'll redirected to 
login page, and returnUrl, accessed by Yii::app()->user->returnUrl, have url 
like this: "/index.php?r=site/contact". This url satisfy the condition. But 
when I directly go to login page, returnUrl contains url like this: 
"/index.php", that satisfy the condition too. So, I always redirect to 
Yii::app()->controller->module->returnUrl ("index.php?r=user/profile"). This is 
not so good :)

Original issue reported on code.google.com by iksm...@gmail.com on 18 Feb 2011 at 9:04

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r118.

Original comment by mish...@gmail.com on 31 Mar 2011 at 3:13