Run this query on your database:
Rich (BB code):
UPDATE xf_user AS u
SET u.gender = (
SELECT IF(ufv.field_value = '', '', IF(ufv.field_value = 'male', 'male', 'female'))
FROM xf_user_field_value AS ufv
WHERE ufv.user_id = u.user_id
AND ufv.field_id = 'my_identifier'
);
You need to change the two
red pieces.
male is the value for your imported profile field that defines the male gender.
my_identifier is the
field_id of your imported profile field which can be seen among the records in the
xf_user_field_value table.
This query assumes there are only 3 possible values for your imported field... empty, male, and female. Female results from the first two cases not being true. There is no transgender or any other values covered by this query. If you need to cover additional values then this query needs to be modified. Otherwise the extra values will all become females.