Posted on: 06/23/04 01:12am
By: chief123
I have searched, read, and tried to find the answer on my own but so far no luck.
What I want to do is to automatically assign certain users to certain groups without doing it manually.
So when Joe Regular User signs up he is assigned automatically as is now.
When Joe Special User signs up he is assigned automatically to a special group for special users or whatever.
If this functionality isn't currently available do any of you see workarounds to get close to what I need?
Thanks in advance.
Automatically assigning users to different groups
Posted on: 06/23/04 02:03pm
By: Dirk
Such functionality is not currently available. The main reason being the question what makes Joe Special User so special (i.e. different from Joe Normal User) that he can be assigned to a certain group automatically?
Once you've figured that one out, you can write the code to do just that. The hooks (custom user registration) are all there ...
bye, Dirk
Automatically assigning users to different groups
Posted on: 11/09/04 04:48pm
By: rjrufo
I'm looking to do the same thing. Could (or should) I create a new table with the group assignments I'd like the new users to belong to, and have a drop down menu to have them select which group they want to join?
My idea is to have certain geographic locations, and have each new user select the appropriate location to where they live. That way, they can have the content delivered to them that pertains to their location, and not somewhere else.
Or is there a better way?
Automatically assigning users to different groups
Posted on: 11/09/04 04:59pm
By: Dirk
[QUOTE BY= rjrufo] My idea is to have certain geographic locations, and have each new user select the appropriate location to where they live. [/QUOTE]
Sounds pretty much like what
this plugin[*1] does. It lets users choose which (regional) Mac user group they belong to.
bye, Dirk
Automatically assigning users to different groups
Posted on: 11/09/04 05:12pm
By: rjrufo
Thanks Dirk,
I was just looking at that when the notification of your reply came in. It will have to be modified to fit what I want to do, and I'll need to figure out how to implement it when new users sign up, but I think it's what I want.
Thanks again for your prompt reply. I'm beginning to wonder how you get anything done, other than replying to everything posted in the forums. It seems that every time I post something, you reply within minutes, regardless of the time of day. Could it be that you're a robot of some kind? If so, I sure can use you around here...
Automatically assigning users to different groups
Posted on: 11/18/04 04:38pm
By: rjrufo
Dirk,
I'm stumped. I'm trying to convert the check boxes from the MacIG plugin you referred to to a select list so that I can save screen space. I had it so that every location would show up in it's own select list, but I want all of them in one. I then broke the whole thing, and now have to revert back to the original code. The code I'm trying to modify - not break - is:
/**
* Create a set of checkboxes with all available MacIG groups.
*/
function macig_makeSelection ($uid)
{
global $_TABLES;
$retval = '';
$grplist = macig_getGroups ($uid);
$macigs = macig_getAll ();
foreach ($macigs as $name => $id) {
$retval .= '<input type="checkbox" name="macig_group[]" value="'
. $id . '"';
if ($grplist[$name] == $id) {
$retval .= ' checked="checked"';
}
$retval .= '>' . $name . '<br>' . LB;
}
return $retval;
}
Any ideas on what I need to do?
Maybe I shouldn't have addressed this to Dirk, but rather ask if
anyone has any ideas. I'm sure Dirk has better things to do than to reply to my questions - even though it's usually within minutes that he gets back to me - which by the way, I really appreciate.
Automatically assigning users to different groups
Posted on: 11/19/04 07:44pm
By: rjrufo
Ok, maybe this wasn't the approriate topic to post my question. I worked on it some more, and got better results today. I posted a new topic with the code
here[*2] .
Thanks.