Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
I'm creating a module that needs to know the uid of a new user to update a db table. I've tried placing my SQL call in the 'validate' and 'insert' sections of hook_user, but neither work: in validate I get a uid of 0, in insert I don't get a uid at all.
Any help on this? The life-cycle documentation for many of the hooks with operation arguments is pretty poorly documented. I'm not even sure that $user or $edit is valid in a hook_user 'insert'.
I'm trying to use the field select that comes with the contrib folder in flexinode.
I'm trying to edit my own node-flexinode-x.tpl.php, and I'm trying to fetch all sorts of fields, using $node->flexinode_y (where y is the field ID).
For the most part it works fine. But with the select field, I only get the option number, and not the text.
For example, say I defined a select field (lets say, with field ID 7) with the options:
OptionOne
OptionTwo
OptionThree
OptionFour