Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
rjms
Regular
Regular



Joined: Feb 10, 2012
Posts: 56

PostPosted: Sat Feb 18, 2012 6:55 am Reply with quote

Using a fresh install of RavenNuke 2.5

With integrated BBtoNuke 2.0.23


When trying to edit a members permissions to view certain forums i get the following error when I press the submit button, I am not trying to make the user a moderator:

Could not obtain moderator status

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND aa.group_id = ug.group_id AND aa.auth_mod = 1 GROUP BY ug.user_' at line 3

SELECT ug.user_id, COUNT(auth_mod) AS is_auth_mod FROM nuke_bbauth_access aa, nuke_bbuser_group ug WHERE ug.user_id IN () AND aa.group_id = ug.group_id AND aa.auth_mod = 1 GROUP BY ug.user_id

Line : 561
File : admin_ug_auth.php


P.S. this is the only user that gets this error, when i edit other members i do not get this error.
 
View user's profile Send private message
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1123

PostPosted: Sat Feb 18, 2012 7:15 am Reply with quote

Are you sure u got this message with 2.5? Shocked

I guess u didn't search for this error.

Create a file fixgroup.php and upload it you to your forum module where index.php is:

Code:
<?php

//www.yourdomain/modules.php?name=Forums&file=fixgroup
if (!defined('MODULE_FILE')) {
   die ("You can't access this file directly...");
}

if ($popup != "1"){
   $module_name = basename(dirname(__FILE__));
   require("modules/".$module_name."/nukebb.php");
} else {
    $phpbb_root_path = 'modules/Forums/';
}

define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include('includes/functions_search.'.$phpEx);

// Start session management
$userdata = session_pagestart($user_ip, PAGE_SEARCH, $nukeuser);
init_userprefs($userdata);
// End session management

//*****  check users and user groups ****//

$sql = "SELECT user_id, username
      FROM " . USERS_TABLE ."
      WHERE user_id > 0";
if ( !($result = $db->sql_query($sql)) ) {
   message_die(GENERAL_ERROR, 'Could not obtain user list', '', __LINE__, __FILE__, $sql);
}

$liste ='';
while ( $row = $db->sql_fetchrow($result) ) {
   $username = $row['username'];
   $user_id = $row['user_id'];
   $usergroup = '';

   $sql1 = "SELECT ug.group_id
         FROM " . USER_GROUP_TABLE ." ug, ". GROUPS_TABLE. " g
         WHERE ug.user_id = $user_id
            AND ug.group_id = g.group_id
            AND g.group_single_user  = 1
            ";

   if ( ($result1 = $db->sql_query($sql1)) ) {
      $row1 = $db->sql_fetchrow($result1);
         $usergroup =( ( $row1['group_id'] != '' ) ? $row1['group_id'] : 'User has no user group'.$row1 );
   }

   if (!($row1['group_id'] != '')) {
       $sql2 = "SELECT MAX(group_id) AS total
         FROM " . GROUPS_TABLE;
      if ( !($result2 = $db->sql_query($sql2)) ) {
         message_die(GENERAL_ERROR, 'Could not obtain next group_id information', '', __LINE__, __FILE__, $sq2l);
      }

      if ( !($row2 = $db->sql_fetchrow($result2)) ) {
         message_die(GENERAL_ERROR, 'Could not obtain next group_id information', '', __LINE__, __FILE__, $sql2);
      }
      $group_id = $row2['total'] + 1;

      $sql3 = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_description, group_single_user, group_moderator)
            VALUES ($group_id, '', 'Personal User', 1, 0)";
      if ( !($result3 = $db->sql_query($sql3, BEGIN_TRANSACTION)) ) {
         message_die(GENERAL_ERROR, 'Could not insert data into groups table', '', __LINE__, __FILE__, $sql3);
      }

      $sql4 = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
            VALUES ($user_id, $group_id, 0)";
      if( !($result4 = $db->sql_query($sql4, END_TRANSACTION)) ) {
         message_die(GENERAL_ERROR, 'Could not insert data into user_group table', '', __LINE__, __FILE__, $sql4);
      }

      $usergroup = $usergroup.', adding user group '.$group_id;
   }

   $liste .= ( ( $liste != '' ) ? '<br> ' : '' ) . $username.' <b>'.$usergroup.'</b>';
}

message_die(GENERAL_MESSAGE,'Users:<br>'.$liste);

?>


Replace yourdomain with your domain and paste the whole address on your browser. U need to be as administrator.

Code:
www.yourdomain/modules.php?name=Forums&file=fixgroup
 
View user's profile Send private message
rjms







PostPosted: Sat Feb 18, 2012 7:43 am Reply with quote

thanks Smile and yup it's the newest distro RN 2.5
 
rjms







PostPosted: Sat Feb 18, 2012 7:44 am Reply with quote

Information

Users:
Anonymous User has no user group, adding user group 5
Solo User has no user group, adding user group 6
abno96 4
MsDiRtY User has no user group, adding user group 7
Gales User has no user group, adding user group 8

??
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

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 ©