Here's a patch that redirects after login. It works with user/login. I tried to get it to work with the standard user login block, but wasn't successful. (Thus, there's a commented section in settings so people using this patch as is won't be confused). A site was trying to use logintoboggan and login_destination.module, but they conflicted with each other. So this tries to roll some of that functionality into logintoboggan.

Disclaimer: I didn't actually look to see how login_destination does it, so that solution may be cleaner and more easily rolled into this module for sites with similar needs.

CommentFileSizeAuthor
logintoboggan_redirect_login.diff.txt3.96 KBaaron

Comments

aaron’s picture

Status: Active » Needs review

oops :) forgot status

hunmonk’s picture

Status: Needs review » Closed (won't fix)

the code looks ok, but i don't want to include this functionality in LT, for a couple of reasons:

  1. i think the functionality you're trying to implement is much more appropriate for it's own module. there's more you can do with it, like different redirects per user role, one time redirects for announcement pages, etc. given that, i don't want to implement a very partial solution in LT. i haven't examined login_destination yet--maybe that's what it does, in which case it makes much more sense to get the modules to play well together.
  2. i do not want LT to become a feature repository for every login feature under the sun--that just leads to a big 'ol mess of code that would be a beast to maintain. i'd be more receptive to turning LT into a login API that other modules can use to do cool things like the one in this issue.
greggles’s picture

Just to "close the loop" there is now such a module: Login Destination. It's pretty simple and even requires editing the module file instead of having a settings page, but it provides this functionality.