After a user registers, how can I send him to a certain page, aside from the home page? Using hook_user?
Can I get a hint as to how to set this up?
Thanks!
Fred Jones ha scritto:
After a user registers, how can I send him to a certain page, aside from the home page? Using hook_user?
Can I get a hint as to how to set this up?
Thanks!
user/register?destination=URL
M.
Davide Michel 'ZioBudda' Morelli wrote:
Fred Jones ha scritto:
After a user registers, how can I send him to a certain page, aside from the home page? Using hook_user?
Can I get a hint as to how to set this up?
Thanks!
user/register?destination=URL
user module doesn't appear to expose this link to theming so I tried editing the module directly but it didn't work. Anyone know where I can make this happen?
Thanks.
You might consider writing a little module that uses hook_user in conjunction with drupal_goto to redirect users to a different page:
See http://api.drupal.org/api/function/hook_user/5 for more info on the hooks.
You'd probably have to keep track of it somehow with state, cause you really need to watch for $op='register' and then do the redirect at $op='after_uptdate'.
This might get tricky given the fact the user insert might be creating sessions at the same time, but maybe not.
It's an idea anyway.
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Fred Jones Sent: Monday, February 11, 2008 3:27 AM To: support@drupal.org Subject: Re: [support] Send Users to Page after Register
Davide Michel 'ZioBudda' Morelli wrote:
Fred Jones ha scritto:
After a user registers, how can I send him to a certain page, aside
from
the home page? Using hook_user?
Can I get a hint as to how to set this up?
Thanks!
user/register?destination=URL
user module doesn't appear to expose this link to theming so I tried editing the module directly but it didn't work. Anyone know where I can make this happen?
Thanks.
Metzler, David wrote:
You might consider writing a little module that uses hook_user in conjunction with drupal_goto to redirect users to a different page:
See http://api.drupal.org/api/function/hook_user/5 for more info on the hooks.
You'd probably have to keep track of it somehow with state, cause you really need to watch for $op='register' and then do the redirect at $op='after_uptdate'.
This worked. I actually tried this initially, but I had named my function wrong so it was never executed. Now it's correct and it works fine. :)
Thanks!
Quoting Fred Jones fredthejonester@gmail.com:
After a user registers, how can I send him to a certain page, aside from the home page? Using hook_user?
Can I get a hint as to how to set this up?
You might find some interesting ideas in the Login Destination module [1].
[1] http://drupal.org/project/login_destination
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/