0

I have a site which contains many links on the pages. Now I want to achieve the following:-

  • User logs in website with credential and visit one of the page in the site.
  • User right click on link and open the link in new tab.Now there are two pages of website opens in user's browser in two tabs.
  • Currently Log Out option is visible on every page of the website. Authenticated user click on log out option in the page opened in one of the tab.
  • Log out redirects user to login page.
  • So as per these scenario ,there is one more page remains open in another tab.
  • Now if the same user click on any of the link in the page then it should redirect to login page

Please provide your valuable input to achieve this functionality.

3
  • 1) do you mean you want a user's browser to open a new window when they login? 2) doesn't make any sense at all 3) for someone who is logged in, or logged out? You question is missing a great deal of information - try explaining as a user would see it: user goes to site, does A, causing B, with option C, etc
    – Geoff
    Commented Jun 20, 2015 at 17:12
  • Edited the question and made it more descriptive now. Hope it helps you. Commented Jun 20, 2015 at 18:59
  • assuming the user tries to access a page not available to anonymous users (after the user logs out), Topsitemakers answer should work. If you allow anonymous users to view those pages, I don't think there's anyway to get it to do what you want, since the site will have no idea about the current state of the browser and its tabs - the only way I could see to do it to restrict viewing content to authenticated users only, and then use the Redirect 403 to User Login (or similar) module
    – Geoff
    Commented Jun 20, 2015 at 21:46

1 Answer 1

0

Sounds as if you need the Redirect 403 to User Login module:

Redirect the HTTP 403 error page to the Drupal /user/login page with an optional message that reads:

"Access denied! You must login to view this page."

Also, the desired page is appended in the url query string so that, once login is successful, the user is taken directly where they were originally trying to go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.