XF 1.2 Merge location field with custom user field


I just imported vbulletin to xenforo. I have 2 location fields, the default xenforo one and a custom user field. I wish to move the default location field to the custom user field and then hide the default location from the profile pages so only 1 "location" shows up.

The reason I wish to do this is to make location required upon registration.

Can anyone help with the query to do this?


Well-known member
Easiest would be to edit the templates to hide the default location field on the registration and profile templates.


Location field isn't on the registration form right? Is there someway I can change this and make it required? I saw there was an addon for 1.1 but it says it doesn't work for 1.2.


I've done much the same thing. It can be handy to require location on registration as the spammers often lie about their location. I have a little external script where I can track recent registrations and compare actual location with what the spammers wrote.

My useful information is that if you put location in member info beside posts it doesn't show up if empty. You can put both the normal and custom ones on there and you don't get 2 locations if one is always empty. (Maybe you do if you leave the "Location: " bit in there. I removed that bit from the member info template.

For me I added a custom field for location and set it to be required in registration. Then removed the standard location edit box in the user profile template. Then messed around in user-info template and removed the "location:" bit from both.

Result is all good apart from every imported member will need to add their location again when editing their profile, and the nice " member from Porlock" (or wherever location after usernames in some places) will not appear.
Last edited: