Code-based user registration -- VSITE

Events happening in the community are now at Drupal community events on www.drupal.org.
Grondhammar's picture

Hi all,

We are working to automate the filling of course websites with auto-created users based on our campus centralised course roster info. So far, I've had good success creating users via Drupal's stock user_save, then adding them to sites via og_subscribe_user_action.

The problem comes when I try to get vsite profile information in (i.e. the user's first and last name).

I tried looking all over OS's code for where this is added on user creation, but can't find it. I then tried examining the data tables and manually creating these records (in content_types_vsite_users_profile and node) but I'm apparently not getting everything because none of the profile info is showing up even though the records are in the DB.

Is there some nice, handy function that put vsite profile info into the DB? Failing that, does anyone know where Open Scholar is doing it's user-creation magic?

Thanks VERY much for any help!
Sean

Comments

That information is added to

rbrandon's picture

That information is added to the user object by way of the "content profile" module which ties one node to a user. So when the user gets created a separate node gets added of type "vsite_users_profile". This holds the first/last name a user image, titles, etc...

If you are doing this programatically you should be able to just create a node of type "vsite_users_profile" with the uid you get back and the information you want them to have.

-Richard

OpenScholar

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: