Hello,
I need to alter the default drupal_goto after a login without a ReturnTo/gotourl set. I'd prefer it dump them on the homepage, not their user page.
Currently I have a module that overrides the user/ menu item and redirects them to the homepage, but this adds about 800ms to 1s to my login process. Which is currently at 15 seconds due to a complex chained IDP setup. I'm looking for any improvement I can find.
This is where I'm hacking it:
drupal_goto('user/' . $user->uid);
Would the community be open to making this configurable?
I see two options:
1. Configuration for default gotourl. Would need tokens or something for setting uid.
2. Hook to alter the gotourl via another module.
Not asking anyone to do the work, just asking if you are open to it. If so, I'll submit a patch. If not, then I'll maintain my own copy with it just hard coded to .
Thanks!
Comments
Comment #2
nathanlenz CreditAttribution: nathanlenz commentedNever mind, easy enough to do by implementing hook_drupal_goto_alter and changing requests to user/[0-9]{1,11}, replacing with contents of a variable set in the module that implements the hook.
This is ok for my situation because I never want anyone to goto the user page, just isn't important because my users are managed elsewhere.
Comment #3
Sneakyvv CreditAttribution: Sneakyvv at Calibrate for Government of Flanders commentedI like to reopen this issue as I'm confronted with the same “problem“.
I chose the first solution nathanlenz proposed, a setting in the configuration form.
Comment #4
ryan.gibson CreditAttribution: ryan.gibson commentedA slightly different take on the patch. Some adjustments to the original patch to skip the other checks if a user-configured setting has been provided.