I want to create a content type that I can add to a map view based on nodes. I am using the GMap and Location modules. There doesn't seem to be an obvious way to add users to view based on nodes. So, I want to make a content type, which is a subset of the users and the fields in my user profiles. I know that I can separately have a map view based on my users, but I need to show them all together users, and 3 spatial content types.

My initial thought was just to copy the raw user data from the database and create a content type and populate it from feeds, but this would lead to a lot of duplicate data in the database.

I've created a content type with an entity reference to users. This lets me manually add content with the user name but I don't know how to share fields between the content types and I don't know how to autopopulate the content from the existing user fields.

How do I proceed?

1 Answer 1


So the thing is that u want to populate user fields with content from node, what you can do is enable module, hook_post_action, and after that use its hook "hook_node_update", and you will get user id (uid) from the user reference fields, u can load a user from that uid, using user_load, after that set required value of field, and use user_save function to save that user, If u are using profile2 for the user, then u can use profile2_load_by_user, profile2_save.

  • I actually want to load user fields into the node referencing the users.
    – nizz0k
    Commented Dec 30, 2015 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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