Topic: How do I make moderators to

be able to assign groups. Ie when someone registers they put them in the right group.

But I dont want them to be able to make another person moderator or admin. Thats a task I want the admin to have.

Re: How do I make moderators to

bump, need this thing

3 (edited by Elzar 2006-03-17 12:42)

Re: How do I make moderators to

profile.php

Replace

else if (isset($_POST['update_group_membership']))
{
    if ($pun_user['g_id'] > PUN_ADMIN)
        message($lang_common['No permission']);

With

else if (isset($_POST['update_group_membership']))
{
    if ($pun_user['g_id'] > PUN_MOD)
        message($lang_common['No permission']);

Re: How do I make moderators to

Elzar:

But I dont want them to be able to make another person moderator or admin

Re: How do I make moderators to

Smartys wrote:

Elzar:

But I dont want them to be able to make another person moderator or admin

It wouldn't exactly be elegant, but by using Elzar's suggestion in conjunction with CodeXP's Group Change Security mod, a moderator could try to make someone an admin/moderator, but they'd need the key that gets emailed to the administrator to do so.

Looking for a certain modification for your forum? Please take a look here before posting.

6 (edited by Mr Puto 2006-03-18 01:48)

Re: How do I make moderators to

Do what Elzar did, then

Replace: (line 1565).

                $result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups WHERE g_id!='.PUN_GUEST.' ORDER BY g_title') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());

with:

if ($pun_user['g_id'] == PUN_MOD)
$modquery = "AND g_id!='.PUN_ADMIN.' AND g_id!='.PUN_MOD.' ";

$result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups WHERE g_id!='.PUN_GUEST.' '.$modquery.'ORDER BY g_title') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());