user_level in phpbb.inc.php user_level in phpbb.inc.php
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

user_level in phpbb.inc.php

Started by m-a-b, October 14, 2004, 09:54:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

m-a-b

hi!

i want that users with user_level 1 AND 2 have admin-access in cpg!
(1 is admin in phpbb and 2 is mod in phpbb)

so i changed following code in phpbbinc.php but it's not correct:
      if ($USER_DATA['user_level'] == 1) {
               array_push($USER_DATA['groups'], PHPBB_ADMIN_GROUP);
           }

changed to
           if ($USER_DATA['user_level'] == 1) {
               array_push($USER_DATA['groups'], PHPBB_ADMIN_GROUP);
           }
           elseif ($USER_DATA['user_level'] == 2) {
             array_push($USER_DATA['groups'], PHPBB_ADMIN_GROUP);
        }


and
define('USER_IS_ADMIN', ($USER_DATA['user_level'] == 1));

changed to
       if ($USER_DATA['user_level'] == 1) {
               define('USER_IS_ADMIN', ($USER_DATA['user_level'] == 1));
           }
       elseif ($USER_DATA['user_level'] == 2) {
              define('USER_IS_ADMIN', ($USER_DATA['user_level'] == 2));
           }

but it's not correct!!! (not secure)
i think the second part is wrong but i'm not sure!

i hope someone can help me!

Bye!
Markus

Joachim Müller

edit the bridge file - find// Group definitions
define('PHPBB_ADMIN_GROUP', 1);
define('PHPBB_MEMBERS_GROUP', 2);
define('PHPBB_GUEST_GROUP', 3);
define('PHPBB_BANNED_GROUP', 4);

m-a-b

Quote from: GauGau on October 14, 2004, 11:45:19 PM
edit the bridge file - find// Group definitions
define('PHPBB_ADMIN_GROUP', 1);
define('PHPBB_MEMBERS_GROUP', 2);
define('PHPBB_GUEST_GROUP', 3);
define('PHPBB_BANNED_GROUP', 4);


you have forgotten to post the changed code ;D ;D ;D ;D ;D

Joachim Müller

it's you who's trying to customize the code, not me. I was just giving a hint what code to change. You'll have to figure out for yourself. Making a larger group admin in coppermine is not recommended at all, I srtongly advise you not to commit those changes.

Joachim

m-a-b