1

I have enabled the "User Login" block inside the Content Region and configured it to show on two specific Views which should be password protected.

I have also created two Views and two different access roles for each view.

After I access the password protected pages as anonymous user, I can see both Login screens and authentication on one page works but refreshing the second page shows:

Access denied
You are not authorized to access this page.

Also if I authenticate on page A with login for page B, I get the same message but refreshing page B shows the content.

Could this be a cookie related issue, because I have to clear my browser cookie to logout. Does Drupal only allow one login cookie?

0

I tackle this with Panels.

Instead of having a view as a page, I make a new Panel page. Then I add two variants. For authenticated users, the content has the view, normally configured as a separate panel-pane display. For anonymous users, the variant just has the login block and sometimes a custom content pane that has a brief message.

3
  • Good answer, on top of that I have also configured Selection rules to match which user is logged in. However for anonymous variant after adding 'User login' Widget content, it does not display. All other widgets work fine. The User login block has default configuration. – Dejan Oct 31 '12 at 2:03
  • I just double checked the site I did using this method, and this is how it is configured. Not sure why this isn't working for you. – mpdonadio Oct 31 '12 at 13:29
  • works, I have moved the anonymous variant to the bottom, and there are no rules applied, also picking "System block" for style enables my custom login from block--user--login.tpl.php – Dejan Oct 31 '12 at 17:26
0

You can use Role login page module to create multiple login pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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