Change group_id within User, even if not superadmin
Posted: 15 September 2008 12:56 PM   [ Ignore ]
Newbie
Rank
Total Posts:  21
Joined  2008-08-07

I have a member group that can change the group_id of other members via the EE control panel.

However they cannot change any group id’s via the User module?

Looks like you only allow superadmins to make these changes via the User module (even though it is permitted as far as EE is concerned)…

In any case, my question is: how do I modify the User module to allow a non-superadmin to change group_id’s?

I am not building a site for the CIA or NSA, so some minor violation of security protocols is fine by me.

Profile
 
 
Posted: 15 September 2008 01:19 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  21
Joined  2008-08-07

Cancel that order. Looks like I figured it out.

In case anyone else wants to allow a specific group (let’s say, group number 5) to modify the group_id of their fellow members, they need only change this:

if ( $SESS->userdata['member_id'== $this->member_id OR $SESS->userdata['group_id'== OR ( $TMPL->fetch_param('group_id') AND in_array$SESS->userdata['group_id']preg_split"/,|\|/"$TMPL->fetch_param('group_id') ) ) ) )

to this

if ( 
$SESS->userdata['group_id'== OR
    
$SESS->userdata['member_id'== $this->member_id OR $SESS->userdata['group_id'== OR ( $TMPL->fetch_param('group_id') AND in_array$SESS->userdata['group_id']preg_split"/,|\|/"$TMPL->fetch_param('group_id') ) ) ) )

in mod.user.php

Profile
 
 
Posted: 16 September 2008 08:12 AM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Thanks fogcity smile

I’ll add this one to the User FR list smile

 Signature 
Profile
 
 
Posted: 04 November 2008 09:43 AM   [ Ignore ]   [ # 3 ]
Member
RankRankRank
Total Posts:  76
Joined  2007-07-19

I also need this functionality, to allow more than just super admins to change group id’s

Profile
 
 
Posted: 04 November 2008 09:58 AM   [ Ignore ]   [ # 4 ]
Member
RankRankRank
Total Posts:  76
Joined  2007-07-19

Also, It would be quite nice if User could overwrite the control panel options much like it can with editing passwords (or I at least assume it does this from reading the docs).  I only want my admins to be able to change certain member groups based on template logic rather than having full control in the admin control panel.

Profile