Jump to content

Recommended Posts

For the past 18 months I have been working on a project which is now a considerable size, it consists of many hundreds of pages and I have a slight problem.

 

I only want people to be able to log in once at a time per account. For cross browsers the problem is solved but for tabs I'm not sure of a solution.

 

For example when someone is logged in and middle clicks on a link in firefox it opens the new page in a new tab... From this I need the old tab to become disable in some sense - When they click on something within the old tab it should detect they've opened a new tab and no longer work, return them to the home page.

 

I know for smaller sites you can use things such as:

 

on form_page_2 did the user come from form_page_1

on form_page_3 did the user come from form_page_2

etc

 

But due to the size of this project it wouldn't be possible to identify where each page is coming from / going to and whether it's a legal move as there are too many combinations...

 

If you need any more information as to the problem please let me know and I will try and explain...

 

Thank you for your time.

 

- Monkofdoom

Link to comment
https://forums.phpfreaks.com/topic/46890-sessions-tabs-browsers/
Share on other sites

tabs should share the same session. So if someone goes to your site and opens two tabs, lets call these tabA and tabB

 

If the user logins on in tabA, when they go to tabB and refresh the page or click on links then they should be logged in. If they logout in tabA then they should be logged out in tabB, only if they do a refresh/click a link on the page. However this behaviour depends on how you track users being logged in

 

Every page that should be protected should have some form of checking whether the user is logged in. An easy way of tracking users is sessions.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.