0

I need to bring up some sort of dialog or form to collect user information when they first login. Is there anyway that the user can be redirected to a form that they must fill out before they can proceed when they first login?

I need to do this because we need to collect information from users who have already created accounts and will not have entered the information that we are adding to the user node.

EDIT: I really want to force the user to fill out this form if they have not, so what I am really looking for is a way to redirect all pages on the Drupal site to this form unless they have filled it out.

2
  • 4
    Have you looked into using the rules module for this? The 1st pseudo rule might be when user logs in if form field does not have value redirect to form page. Then if they navigate away from saving something along the lines of if user looks at page and field does not have value redirect to form. This is assuming you're using some sort of field on the user profile. Jan 31, 2014 at 22:33
  • +1 @pokermoneyclips suggestion, use rules. If the form is not filled out, redirect back to the form.
    – Tim Wooten
    Feb 2, 2014 at 0:40

1 Answer 1

0

This should do it. although there might be a module that already does this as well.

https://api.drupal.org/api/drupal/modules!user!user.api.php/function/hook_user_login/7

1
  • This is a helpful hook but if this hook just redirected to my form they could just navigate away without filling out the form. I am wondering if there is a way to basically redirect all pages to the form until they fill it out?
    – Mike2012
    Jan 31, 2014 at 22:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.