coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: m-a-b on October 14, 2004, 09:54:50 PM

Title: user_level in phpbb.inc.php
Post by: m-a-b on October 14, 2004, 09:54:50 PM
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
Title: Re: user_level in phpbb.inc.php
Post by: Joachim Müller 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);
Title: Re: user_level in phpbb.inc.php
Post by: m-a-b on October 15, 2004, 12:49:30 PM
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
Title: Re: user_level in phpbb.inc.php
Post by: Joachim Müller on October 15, 2004, 12:53:33 PM
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
Title: Re: user_level in phpbb.inc.php
Post by: m-a-b on October 15, 2004, 01:03:58 PM
okay!
thanks!

i will try...