We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Groups add/remove | Forum

Topic location: Forum home » Support » General Questions
David A
David A Mar 5 '13
Is there a way to add people to groups without using the whole invite/join process?

Also, other than deleting the user who made a group, is there another way to delete it?

David

Alia Team
Alia Mar 6 '13
>>Is there a way to add people to groups without using the whole invite/join process?

Yes, possible via database.

1. Find needed username in ow_base_user table  in database. Remember userID. For example username=test5, userID=9.
2. Create a new group. Look at group's URL. URL=yoursitename.com/groups/4 . 4- is this group's ID. Remember this ID as well.
3. Find  ow_groups_group_user table in database.
As you can see first column says "ID". IDs are given by order (1 2 3 4 5...). Remeber the last ID in the row. In my case=9

4. Insert a new row into the table.
ID= enter the next number after the latest ID from step #3 . My last ID=9, so for the new row I will use ID=10

Group ID= enter your group ID, which you remembered from step #2. In my case GroupID=4

User ID= enter ID of the user you would like to add to this group. See step #1. In my case User ID=9

TimeStamp=enter timestamp. This is the date user joins the group. To make it work perfectly join the group using regular join form, then in ow_groups_group_user table find joined user. Copy his timestamp and paste it into the "TimeStamp" field when adding user to group via database.

Privacy = group I have created was opened to everybody. So I will use "everybody"
Click GO.



5. Check "Groups" page. New user should have be listed under "Users" section of group's page.

Hope that this helps.

>>Also, other than deleting the user who made a group, is there another way to delete it?

User who created the group needs to click "Edit" on group's page>> and then within the opened page click on "Delete" button.

Also site admin can edit any group and delete it.

Alia Team
Alia Mar 6 '13
David, do changes within the database only if you are confident in what you are doing. Otherwise you might ruin your site. And don't forget to make a back up before you do any changes within the database ))
David A
David A Mar 6 '13
yeah this is great... but it looks like something to practice first

Alia Team
Alia Mar 6 '13
yes, it does require some practice.

It is much better to do this via creating a plugin.
Guna
Guna Sep 26 '14
@Alia Can you please provide an example to add a user to a group on user registration? I am creating a plugin which needs to do the following.


Create Registration Form (Completed) (Once submitted, Redirect to choose class room page.)


User will have a select box with the list groups. User can join in only one group. 


Any examples please

ross Team
ross Sep 29 '14
ow_plugins/groups/controllers/groups.php


public function join( $params )

Guna
Guna Dec 24 '14
@ross Thank you
ross Team
ross Dec 25 '14
You're welcome