Previous Page In Login With Openid

Hello I have 2 problems with login:

1- I use OpenId for login and I cant redirect to previous page after successful login because in this case the previous page is a site that users have account there like google. How can I get previous page after login?

2-I read this article to save session in db;

when I did this work; after login; the sessions that were set are removed.

now what do i to do for solving these problems ?

hi mohsen!

  1. check and test by the Yii::app()->user->returnUrl;

  2. Let us a more experienced member to answer that B)

thank you for taking times for me;

I use this code but after login redirect to home page

Any suggestion from anyone?