Take user back to previous page after logging in?

后端 未结 6 1054
故里飘歌
故里飘歌 2021-01-20 16:18

I have a controller called Accounts, with the views signin and signout.

The corresponding functions look like this:

function signin()
{
    if (!empt         


        
6条回答
  •  梦谈多话
    2021-01-20 16:48

    I don't know about the best way, but I store the attempted destination in a session variable before redirecting them to the sign in page.

    Once they have signed in, I redirect them to the stored destination.

提交回复
热议问题