I need to be able to import users and assign them to organic groups. This is something I can build myself If I get some direction on how to correctly implement it.

CommentFileSizeAuthor
#2 user_import_organic_groups_1.patch1.97 KBZack Rosen

Comments

robert castelo’s picture

I also need to integrate user import with OG for a project, but won't have time to work on it for at least two weeks.

If you're in a hurry, and want to do it yourself, add a function to handle the import into OG - e.g. function _user_import_organic_groups()

Call the function just before:

 if ($settings['options']['send_email'] == 1 || $settings['send_email'] == 1) _user_import_send_email($account, $password, $fields);
Zack Rosen’s picture

StatusFileSize
new1.97 KB

Here is a patch (I've only tested once).

robert castelo’s picture

Thanks Zack. At a glance this looks good.

Tied up for a few days, but I'll test it out as soon as I can.

Zack Rosen’s picture

Ok. Right now it accepts multiple group nids on import deliminated by ';' ... does this make sense to you? Also, looks like i forgot to add support for error tracking :/ I will do that if i remember tomorrow.

robert castelo’s picture

Assigned: Zack Rosen » robert castelo

I'm going to auto detect existing groups and present option as checkbox for each one.

Zack Rosen’s picture

Sounds like a better plan than mine Robert.

robert castelo’s picture

Status: Active » Fixed

Feature added in User Import 4.7.x-1.0 version.

Anonymous’s picture

Status: Fixed » Closed (fixed)