Download & Extend

Redirect on Access Denied to /users/login

Project:LoginToboggan
Version:7.x-1.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

For theme purposes it would be great for LoginTobagan to redirect all Access Denied to /user/login

The Idea is to redirect people to the path /user/login so that a unified block configuration can be assigned to the login screen. A Querry String can be used to redirect the user to the page if the access is available.

This has a few benifits. For SEO perposes it unifies the page to one location. It also can create a unique user configuration for all user login requests. It also allows us to setup a unified block setup that can describe the site, its benifits and login/registration help.

Comments

#1

I have recently upgraded Drupal from 6.10 to 6.12 and LoginToboggan from 1.3 to 1.5 (and some other modules).

Before the users used to be redirected to a login screen formated in the site theme.
Now the users get redirected to a login screen formated in the administration theme.

I haven't yet identified what made that change - but above suggestion should fix it.

#2

i would consider this for 7.x, but somebody will need to step up with a good patch. :)

@xibun: sounds like an issue with your upgrade, not with LT.

#3

please see http://drupal.org/project/logintoboggan#commitment for more information on how task/feature requests are handled in the module

#4

Status:active» needs review

having a unified login page without being able to use it, i consider a bug.

needed this for a project so kindly stepping up with a good patch(tm).

additionally
* user can choose between "user/login" and "user/register" to redirect to
* privides a fallback setting for authenticated 403 page

AttachmentSize
0001-fixes-465390-redirect-to-user-login-register-on-anon.patch 4.91 KB

#5

this improvemed version
* cleans its variable up on uninstall
* redirects you back to where you came from after login/register

AttachmentSize
0001-fixes-465390-redirect-to-user-login-register-on-anon.patch 5.49 KB

#6

This is the exact patch I need. For my site, I wanted to redirect to "user/register" instead of "user/login" on 403.

I'm using this to lazy'ly do a redirect from node/add/content if the user does not have access to create the content.

I'd recommend this patch for consideration into the next version of logintoboggan. Works as expected.

+1

#7

I'm a newbie at some of this. Where do I install the patch? From the thread it seems this patch will fix a situation I am facing with a site I am developing. I'm not a coder per se so for things like this I need a little extra help. I know enough to get the job done and possibly be dangerous . :) thanks!!

#8

Status:needs review» needs work
  1. patch no longer applies
  2. +  if($anon_403 == '0') $anon_403 ='';
    +  if($anon_403) variable_set('site_403', 'toboggan/denied');
    not up to coding standards, should use brackets
  3. i don't like the removal of logintoboggan_page_alter(), i believe removing the blocks on access denied is a good thing.
  4. in general, not sure if i like this approach over the current one. you don't need a redirect now and you still end up on the page you originally intended.
  5. some of the problem here has been solved by #1172652: Show unified login on Access Denied
nobody click here