Author |
Message |
kd8hho
Worker
Joined: Mar 30, 2009
Posts: 132
|
Posted:
Sat Nov 03, 2012 12:27 am |
|
Redid my site. and went to re-add an admin. and well account is active yet he has nothing to admin. (no modules shown) any ideas?
[ Only registered users can see links on this board! Get registered or login! ]
[ Only registered users can see links on this board! Get registered or login! ]
shot 2 shows what he should have. shot 1 shows what he gets |
_________________ Linux Register User #481509 | Ubuntu Register User #25492
Last edited by kd8hho on Tue Nov 06, 2012 9:35 pm; edited 2 times in total |
|
|
|
neralex
Site Admin
Joined: Aug 22, 2007
Posts: 1774
|
Posted:
Sat Nov 03, 2012 4:07 am |
|
Take a look into your nuke database and check the table nuke_modules. Do you have your added admin in the admins-row? |
|
|
|
|
kd8hho
|
Posted:
Sat Nov 03, 2012 2:18 pm |
|
neralex wrote: | Take a look into your nuke database and check the table nuke_modules. Do you have your added admin in the admins-row? |
yes admin is showing in the nuke_modules |
|
|
|
|
kd8hho
|
Posted:
Tue Nov 06, 2012 2:18 pm |
|
bump.
So im still scratching my head on this.. admin is set correctly. and the admin account is showing in the nuke modules db like it should. but still admin has nothing to admin when he logs in...
trying to figure this one out turned a few hairs grey |
|
|
|
|
wHiTeHaT
Life Cycles Becoming CPU Cycles
Joined: Jul 18, 2004
Posts: 579
|
Posted:
Tue Nov 06, 2012 3:37 pm |
|
I want to set myself available to help you out on this for the next hour.
You can contact me over here with a pm or use the email adres in my profile.(have msn running).
Grtzzz wHiTeHaT. |
|
|
|
|
fkelly
Former Moderator in Good Standing
Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Tue Nov 06, 2012 4:43 pm |
|
My fuzzy memory reminds me that there was a problem with the is_mod_admin function in an early version of our latest release. The admin.php program populates the list of modules in the ACP by running through the file system for each module. The code is:
Code: $result = $db->sql_query('SELECT `title` FROM `' . $prefix . '_modules` ORDER BY `title` ASC');
while ($row = $db->sql_fetchrow($result, SQL_ASSOC)) {
if (is_mod_admin($row['title'])) {
if (file_exists(NUKE_MODULES_DIR . $row['title'] . '/admin/links.php')) {
include_once NUKE_MODULES_DIR . $row['title'] . '/admin/links.php';
}
}
}
|
If your modules directory is populated and if the system recognizes you as a module admin then the icon and name for the module will appear in the ACP.
From your screen image, it appears you weren't signed in as GOD admin. If you could do that and see if the problem goes away, we can probably narrow the problem down to getting you a "fixed" version of is_mod_admin.
Here is the code from the latest release -- this is from mainfile.
Code:function is_mod_admin($module_name = '') {
global $admin, $db, $prefix;
static $authmod = array();
if(!is_admin($admin) || empty($module_name)) return 0;
if(isset($authmod[$module_name])) {
return $authmod[$module_name];
}
$aid = is_admin($admin);
$authmod[$module_name] = false;
$admins = '';
$radminsuper = 0;
$query = $db->sql_query('SELECT `name`, `radminsuper` FROM `' . $prefix . '_authors` WHERE `aid`="' . addslashes($aid) . '"');
list($name, $radminsuper) = $db->sql_fetchrow($query, SQL_NUM);
if (($radminsuper == 1 && $name == 'God') || ($radminsuper == 1 && $module_name != 'founder')) {
$authmod[$module_name] = true;
}
if ($module_name != 'admin' && $module_name != 'founder' && $radminsuper == 0) {
$query = $db->sql_query('SELECT `admins` FROM `' . $prefix . '_modules` WHERE `title`="' . addslashes($module_name) . '"');
if ($query) {
list($admins) = $db->sql_fetchrow($query, SQL_NUM);
}
$admins = explode(',', $admins);
$count = count($admins);
for($i=0; $i < $count; $i++) {
if($name == $admins[$i] && !empty($admins)) {
$authmod[$module_name] = true;
}
}
}
return $authmod[$module_name];
}
|
If yours is different it might be causing the problem but I'd try logging in as the GOD admin just to make sure. |
|
|
|
|
kd8hho
|
Posted:
Tue Nov 06, 2012 9:35 pm |
|
mainfile code you posted fixed the issue.
the screen shot was of the admin account in question. (i used god to create it) |
|
|
|
|
|