PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Johan1982
New Member
New Member


Joined: Oct 23, 2003
Posts: 24

PostPosted: Sun Apr 04, 2004 2:43 pm Reply with quote Back to top

The following code exists in admin_ug_auth.php of Nuke 6.5 but this code doesn't exist in admin_ug_auth.php of the other Nuke versions

Code:
//
// Check if a private user group existis for this user and if not, create one.
//
        $sql = "SELECT user_id FROM " . USER_GROUP_TABLE . " WHERE user_id = $user_id";
        $result = $db->sql_query($sql);
        $row = $db->sql_fetchrow($result);
        $user_check = $row['user_id'];
        if ( $user_check != $user_id )
        {
            $sql = "SELECT MAX(group_id) AS total
                    FROM " . GROUPS_TABLE;
            if ( !($result = $db->sql_query($sql)) )
            {
                message_die(GENERAL_ERROR, 'Could not select last group_id information', '', __LINE__, __FILE__, $sql);
            }
            if ( !($row = $db->sql_fetchrow($result)) )
            {
                message_die(GENERAL_ERROR, 'Could not obtain next group_id information', '', __LINE__, __FILE__, $sql);
            }
            $group_id = $row['total'] + 1;
            $sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_description, group_single_user, group_moderator)
                    VALUES ($group_id, '', 'Personal User', 1, 0)";
            if ( !($result = $db->sql_query($sql)) )
            {
                message_die(GENERAL_ERROR, 'Could not create private group', '', __LINE__, __FILE__, $sql);
            }
            $sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
                    VALUES ($group_id, $user_id, 0)";
            if ( !($result = $db->sql_query($sql)) )
            {
                message_die(GENERAL_ERROR, 'Could not create private group', '', __LINE__, __FILE__, $sql);
            }
        }
//
//  End Private group check.
//


The previous code goes after this code in admin_ug_auth.php

Code:
                                        $forum_auth_level[$forum_id] = AUTH_ACL;
                                        $forum_auth_level_fields[$forum_id][] = $forum_auth_fields[$j];
                                }
                        }
                }
        }


I believe that this saves the problems of the moderators, I have proven it and it has worked to me, know if some Security Fix needs? Question
View user's profile Send private message
Sugs
New Member
New Member


Joined: Dec 23, 2004
Posts: 9

PostPosted: Sat Jan 22, 2005 4:10 am Reply with quote Back to top

Will this fix my problem with 7.6 not making people moderators in admin cp/forums/user permissions ?????
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum