This topic is locked

Assign Users To Groups Programmatically

1/6/2013 7:08:46 PM
PHPRunner General questions
T
Tempus_Erus author

Hi,
Using dynamic permissions, is it possible to programmatically assign that user to a group?
I have basically set up a 'super user' and a 'user' group. Within the user group they can assign new users. I have a drop down box to select the relevant 'user' group (GroupID) but would then like to assign this group automatically, rather than go to another 'screen' and tick the check box.
Any ideas or direction would be welcome.
Thanks in advance.

C
cgphp 1/7/2013

Check how the TABLENAME_ugrights is populated and then update the records using standard queries.

T
Tempus_Erus author 1/9/2013



Check how the TABLENAME_ugrights is populated and then update the records using standard queries.


Thanks Cristian. I had previous looked into this. The ugroups have a group ID -1 to 3 in this case, then a series of letters - the Access Mask. I looked at the umembers and found this already populated with the correct group. I thought that if I untick a check box and save the update would enter a different number for example. Guess I need to understand what changes upon ticking a box in the 'assign user to a group'?...apologies if this appears a stupid question or if I have missed the obvious.

C
cgphp 1/10/2013

Yes, do some tests and check what changes upon ticking a box are reflected in the database.