Page 1 of 1

Allowing admins to create new users

PostPosted: Wed Sep 19, 2007 3:12 pm
Author: jforena
On our forum only the founding admin can create a new users. How can non-founding admins be given the privs to create new users? Currently, they receive the message "Sorry, you're not authorized to view/change these settings." Thanks for any help!

- jf

Re: Allowing admins to create new users

PostPosted: Fri Sep 21, 2007 10:56 am
Author: jforena
Anyone?

Re: Allowing admins to create new users

PostPosted: Fri Sep 21, 2007 2:02 pm
Author: Helter
you would have to add them as founders, which would give them permissions equal to yours and you would not be able to edit thier accounts anymore.

open root/profilcp/functions_profile.php

find

Code: Select all
        $res = USER;         if ( ($userdata['user_level'] == ADMIN) && ($userdata['user_id'] == 2) )         {             $res = ADMIN_FOUNDER;


inline, find

Code: Select all
2)


inline, after, add

Code: Select all
 || ($userdata['user_level'] == ADMIN) && ($userdata['user_id'] == 3) || ($userdata['user_level'] == ADMIN) && ($userdata['user_id'] == 4) || ($userdata['user_level'] == ADMIN) && ($userdata['user_id'] == 5)


replace 3, 4 and 5 with the user id's of the admins you want to have founder priv's

Re: Allowing admins to create new users

PostPosted: Mon Oct 01, 2007 2:08 pm
Author: jforena
Thanks for the feedback and excuse my inexperience but I've added the code to root/profilcp/functions_profile.php and for some reason the designated admin's still are not able to add new users. It appears they are not recognized as founders.

Here is the code I added:


Code: Select all
        $res = USER;         if ( ($userdata['user_level'] == ADMIN) && ($userdata['user_id'] == 2) || ($userdata['user_level'] == ADMIN) && ($userdata['user_id'] == user1) || ($userdata['user_level'] == ADMIN) && ($userdata['user_id'] == user2) || ($userdata['user_level'] == ADMIN) && ($userdata['user_id'] == user3) )         {             $res = ADMIN_FOUNDER;         }


Of course user1, user2, and user3 are admin user id's. Is there something I'm doing wrong here?

Thanks for the feedback.

Re: Allowing admins to create new users

PostPosted: Mon Oct 01, 2007 2:50 pm
Author: CaNNon
Check the admin panel one of the security mods will also need you to increase the admins to the new number.

also you should have copy and pasted your edit into the code box. so we could check for errors. I have hung myself a few times on stupid typO's <img>

Re: Allowing admins to create new users

PostPosted: Tue Oct 02, 2007 10:24 am
Author: jforena
Thanks, here's the code in the code box:

Code: Select all
       $res = USER;       if ( ($userdata['user_level'] == ADMIN) && ($userdata['user_id'] == 2) || ($userdata['user_level'] == ADMIN) && ($userdata['user_id'] == user1) || ($userdata['user_level'] == ADMIN) && ($userdata['user_id'] == user2) || ($userdata['user_level'] == ADMIN) && ($userdata['user_id'] == user3) )       {          $res = ADMIN_FOUNDER;       }


The Amount of allowed admins = 10.

Don't know if this is a factor but I previously implemented a separate mod because changes to the amount of allowed admins and mods would not take effect.

That mod is documented here (at the bottom)]http://www.integramod.com/forum/viewtop ... pbbmyadmin[/url]