if "User locations" is set to enable in location.module admin, the module collect location infos on account update but not on register.
It may be not an issue, but a willing, I don't know.

don't have time to do a patch so, to correct this bug:

replace

  if ($op == 'form' && $category == 'account' && $user_setting == LOCATION_USER_COLLECT) {

in function location_user($op, &$edit, &$user, $category = NULL)
by

  if ((($op == 'form' && $category == 'account') OR $op == 'register')  && $user_setting == LOCATION_USER_COLLECT) {

Comments

webchick’s picture

Status: Active » Needs review
StatusFileSize
new1.27 KB

Excellent, thanks! Here is a patch. Worked like a charm. :)

ankur’s picture

I'm weary about committing a patch that automatically adds a user-address form to the registration page even if the setting is selected. I'd prefer a patch that would make this configurable. It would be a "sub-option" of the location_user setting that would ask if the address form for collecting user addresses should also be displayed on the registration page.

-Ankur

webchick’s picture

Assigned: Unassigned » webchick

I need this for planetsoc.com, so I'm going to roll a patch. My plan is to add a checkbox or whatever for "gather location information on user registration," as well as hook_form_alter the user settings form to add a location selection similar to what is shown in node forms (allow/require X fields) -- I only want to store city, province, and country not the rest.

webchick’s picture

Status: Needs review » Needs work
webchick’s picture

Title: location.module doesn't collect location infos in register form. » Make user location forms customizable
Version: 4.6.x-1.x-dev » 6.x-3.x-dev
Category: bug » feature
Status: Needs work » Needs review
StatusFileSize
new10.16 KB

This seems to do it:

1. Added to the description under "enable user locations" to refer folks to admin/settings/user to set additional options.
2. Under admin/settings/user, added a full-blown location customization form like there are under the node type settings. This way you can specifically allow/disallow/require whatever fields you want.
3. Also added a checkbox to optionally show location info on registration form.

terrybritton’s picture

Exactly what I need, anything like this for 5.X?

catch’s picture

Version: 6.x-3.x-dev » 5.x-2.7
Status: Needs review » Needs work

Making this the main issue to mark dups against.

like this: http://drupal.org/node/181161

bdragon’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.