I'm trying to force a parallel identifier (to match up legacy system requirements) to correlate to uid
by means of a field_data_field_foo
table.
The field_data_field_foo
was created in the Field UI and because I couldn't see any UNIQUE
and AUTO_INCREMENT
options I set them both for the column field_data_field_foo.field_foo_value
in phpMyAdmin.
I assumed this would be enough to force the issue, but in development I setup a hook_user_presave()
function in my custom module and with a break point inside it, for $account->field_foo
I just get undefined....
field_foo Array [1]
und Array [0]
Because this is something that must be assigned uniquely and I'd like to assign at the point of registration should I be using a different hook? Or is there something else I'm missing?
Btw, it might be something more basic in Drupal that I'm missing as I'm not that experienced with it atm - i.e. due to the nature of this project, I've yet to spend time learning nodes and the like.