[RFC] redirect to previous page after login

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
necer_cheniki
Registered User
Posts: 8
Joined: Thu Aug 11, 2011 5:47 am

[RFC] redirect to previous page after login

Post by necer_cheniki »

Hi,
Problem :

scenario : a user X is not logged in, he navigate in the board then select forum 'F' and he is now reading topics titles. Then, he decide to login, he click on login button, redirected to login page, enter login information and login successfully.
Normally, after he login, the forum system redirect him to previous page ( forum 'F'), but that hasn't happened, he is redirected to main forum page.

Solution :
Save previous page before clicking to login button (save it in cookies for example) then after he login succefully, redirect him the saved page.
Last edited by necer_cheniki on Thu Nov 22, 2012 5:20 pm, edited 3 times in total.

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] redirect to previous page after login

Post by brunoais »

This is too weak for an RFC...
I think the subject itself is not worthy of being an RFC.
Just create a discussion, and if it makes sense create a ticket to file the bug.

If you think this needs to have a real debate (I doubt), then elaborate, give more details advantages and disadvantages, etc...

necer_cheniki
Registered User
Posts: 8
Joined: Thu Aug 11, 2011 5:47 am

Re: [RFC] redirect to previous page after login

Post by necer_cheniki »

RFC updated, hope it's clear now ?

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] redirect to previous page after login

Post by brunoais »

Better! But still kinda weak...
If you still think this is something that deserves and RFC, check this topic for an example:
viewtopic.php?f=108&t=42731&p=236923#p236923

I still think this is something for the discussions forum, though.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] redirect to previous page after login

Post by DavidIQ »

I think this is worth a look. Should be possible going off the referrer. +1.
Image

keith10456
Registered User
Posts: 523
Joined: Sat Apr 22, 2006 10:29 pm
Contact:

Re: [RFC] redirect to previous page after login

Post by keith10456 »

Huge +1 for adding this!

This is one of the small features that makes a big difference on a website.

Currently, when a visitor is on a particular page on your phpBB site, if they click "Login", they're re-directed back to the Index (after logging-in). The visitor then has to try to find-out where they were prior to logging-in. It's more annoying if the visitor is on a custom phpBB page and/or on the page of a mod that is not linked to in the overall_header. I'll be remiss if I didn't add the mind-numbing headache this can cause on large sites like mine.

Relatively speaking it's not a huge issue but like I said, it will be a nice little fix that makes the user experience much better.

Prime's Login Return does great job solving this "problem". And it doesn't take many code edits to apply... ;)


*Edit - Removed some of the hyperbole :)

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: [RFC] redirect to previous page after login

Post by Pony99CA »

Yes, please. On phpBB.com, I usually go to the home page to see if there any blog posts or announcements, then select phpBB Discussion from the Community menu. If I've been logged out (even though I have the option to log me in checked :?), logging in returns me to the Board Index and I have to waste time clicking to the discussion forum again.

It's minor, but very annoying.

I'm not sure that it's worthy of an RFC, though -- I would just open a usability bug and see if it gets fixed. If not, then an RFC may be appropriate.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] redirect to previous page after login

Post by Oleg »

I will support this. Bonus points for using referer header when it is available and keeping the urls clean.

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] redirect to previous page after login

Post by brunoais »

I think session cookies can also be used for this.
Even the anonymous user has session cookies, we just need to store where the user is ATM every time he accesses a page. When we can retrieve that from the cookie value.
I already did that in another closed source system and it works like a charm (according to the ones who use it).

So we could use both methods. If the cookie is not available, use the Referer header.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] redirect to previous page after login

Post by Oleg »

Session cookies are not going to work.

Post Reply