I am going to import data from a csv file, specifically linking a node to a user. I see that I can link a node to a user via user id, however I won't know the user id on import. Is there a way I can link the node to the user via user email?



Ofcourse you can get user id by email, check this out: http://api.drupal.org/api/drupal/modules!user!user.module/function/user_load_by_mail/7

  • Thank you for the quick response. I am currently trying to learn Drupal and not really sure how to implement this? Can you point me in the right direction? Would I add this to the template.php? Also, does this integrate with feeds importer? – Brian Jul 8 '12 at 14:25
  • You should create module for this. Check feed module API for any hooks that you can use for this. – Codium Jul 8 '12 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.