Closed (fixed)
Project:
User Import
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Aug 2009 at 18:29 UTC
Updated:
14 Aug 2009 at 14:56 UTC
Im running into some difficulty with hook_user_import_form_field_match() I have implemented it and have the option i want in my drop down. But upon running an import i dump the $account variable from hook_user_import_pre_save() and my option exists, but the array is empty. Im just working off of the sample.txt file, so i know there is good data in there.
here is my code
function resync_user_import_form_field_match() {
$options['resync']['member_expire'] = "Membership expiration date";
return $options;
}
/*
* Implementation of hook_user_import_pre_save
*/
function resync_user_import_pre_save($settings, $account, $fields, $errors) {
dvm($account);
dvm($fields);
}
which produces the following var_dump
array(2) {
["user"]=>
array(2) {
["password"]=>
array(1) {
[0]=>
string(10) "First Name"
}
["email"]=>
array(1) {
[0]=>
string(5) "Email"
}
}
["resync"]=>
array(1) {
["member_expire"]=>
array(0) {
}
}
}
Comments
Comment #1
cangeceiro commentedFound my problem. You must declare hook_user_import_data and return data