Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes
Author Message
Johan1982
New Member
New Member


Joined: Oct 23, 2003
Posts: 24

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

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

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    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©