Create user, auto add to a group

SilVert

Joined: 2006-03-12
Posts: 9
Posted: Mon, 2006-03-20 19:05

i am running VBulletin and currently have the auto create user script working. but i cannot seem to get the user to automatically be asigned to a group that i have created already (Site Supporter is the name if the group).

i would idealy like to have the script verify that the user is not in group x, then add them to it and call it a day. i have attempted this and have failed(multiple times ;)). done a bunch of searching and others have had similar things working but i really just dont know the correct syntax(i guess) for this.

i assume these are the right code selections:
GalleryEmbed::isUserInGroup()
GalleryEmbed::addUserToGroup()

but i dont know what the 2 variables it wants are. is this correct?
GalleryEmbed::addUserToGroup(user account, group name)

any help would be most appreciated :) sorry if this is newb'ish ;)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2006-03-21 22:11

GalleryEmbed::addUserToGroup() expects external ids for user and group as arguments.
there's also the same function in GalleryCoreApi which expects g2 entity ids.

 
SilVert

Joined: 2006-03-12
Posts: 9
Posted: Thu, 2006-03-23 19:19

Does it want a group name(as in "AllowMe") or does it want a group number (as in "7"). im somewhat noobish to coding so i appoligize if this is common knowledge :)

also, when i delete a user out of G2 and then hit my integration script again, i get the exact error that is talked bout in this thread http://gallery.menalto.com/node/35249... Error (GALLERY_SUCCESS). is there a resolution to this that i have missed?

 
rjett

Joined: 2005-12-11
Posts: 24
Posted: Tue, 2006-04-04 20:33

SilVert, have you figured this out. I'd like to make a form that a user can enter outside of gallery and have a user created and assigned within an established group. Thanks for your help.'
RJ

 
SilVert

Joined: 2006-03-12
Posts: 9
Posted: Tue, 2006-04-04 20:38

i am fighting with some odd embed issues. after i resolve them, i will let you know.

should be a fairly easy test though... i just need to get the embed script to work :)

 
rjett

Joined: 2005-12-11
Posts: 24
Posted: Tue, 2006-04-04 21:07

thanks, will look forward to your advice