Allow arrays in add_to_group

In the documentation it states that you can pass in an array of ids to add a user to these groups, but this currently does not work. I've updated the function now to allow that.

The function will return FALSE if any of the IDs passed are invalid, if all IDs are valid the function will then return the number of groups added successfully.
Yes thats correct, I just modified the existing function which included this. On reflection this doesn't look like it's fulfilling its purpose. This is used to check if the relationship already exists in the database, to prevent repetition. But this will prevent all relationships from being added if one already exists.

I think this should be moved into the foreach starting on line 1428 to check before a relationship is inserted?