I have a Commons site that requires a password for access to most pages. Several pages, including an alternate front page are available to anonymous users via the front module.

When an anonymous user attempts to access a page they do not have access to, they currently are redirected to user?destination=xxx (where xxx indicates the page they were trying to access. I would like them to be redirected to a different page, such as the front page, where they can create an account and also see more information about the account.

This is particularly important, as I am using the forward module and a registered user may forward the authorized front page to a colleague, who should be redirected to the anonymous front page.

So far, I have tried r4032login and logintoboggan without any noticeable change. I am guessing that the redirection is occurring before the appropriate modules can intervene. Is this correct?

For hybrid private/public websites, this seems like important functionality. Sending a potential new member to an uninformative login page doesn't seem very user friendly?

Are there some tweaks to these module settings that I may have missed, or does something need to change on the Commons side?

Thanks for any help.

Comments

lightsurge’s picture

Status: Active » Postponed (maintainer needs more info)

Does this only happen when 'require users to login' is turned on?

I have this turned off, and used this method instead http://drupal.org/node/60148#comment-4825682 to redirect users to login on a 403.

Without this or what happens in commons_core_force_login(), users will get access denied messages when in fact they might have access to the page in question. I'd say in general that would actually be less user-friendly than a login page - and obviously the system can't possibly tell if an anonymous user has access to a particular page until they are logged in or they register, unless you're using something like ldap?

As to redirecting to the front page rather than the login/register page... that might work quite well for anonymous users who aren't registered, it might be a bit of an irritation for anonymous users who are registered and simply want to quickly get to the resource they linked to?

It sounds like in your case your situation might be improved by the anonymous/authenticated front pages sharing the same path (essentially they should do already, i.e. both should be available at http://www.example.com/), but appear differently for authenticated/anonymous? So then it wouldn't matter if that page gets forwarded?

lsolesen’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (won't fix)

Closing out old issues. Please reopen if still relevant.

lsolesen’s picture

Status: Closed (won't fix) » Active

Closed by mistake. This might still be a valid issue. Please close it with the solution, if you already solved it.