By Budrick on
I defined a mymodule_user function with just print(serialize($user)) inside.
function mymodule_user($op, &$edit, &$user, $category = NULL){
print( "<h1>".serialize($user)."</h1>" );
}
But it is not invoked on user login (no output on page). The output appears
only when I click on user account link.
What I actually want to do is redirect after logih, with redirection URL based on user ID.
Please help.
Comments
Not invoked on load only
Ive noticed that it is invoked on 'load', 'logout', but not at 'login'.
Using 4.7 b6.
Started thinking of a core bug...
working on something similar...
from this post:
http://drupal.org/node/54765
you see i am working on something similar..
It's kind of discouraging to see your problem, because i am doing similar approach... i want to store persistent vars containing page url info and on login redir to the page they were going to , instead of the user page. What _should_ be available is the #redirect form option ( undocumented, but logintoboggan uses it and its on line 117 of form.inc) but... i just dont know ... this is a frustrating problem to have. where did you hook into to store the page url? Maybe we can put our heads together ... 2 people searching this volume of information might have better results
An idea
if the way it's supposed to work is not working ( alas, how common ) , then perhaps use hook_form_alter to add the redirect switch ( if it actually works, that is ) to your form , so that they are redirected after they fill it out. Again , check in form.inc for the redirection logic... i dont know why this is undocumented in the form reference though