1
Hey everyone,
Ok -- you don't need experience with the module to help me, but I am using the "Realty" module, and I want to make it so ANONYMOUS users have Admin rights to the module.
The reason for this is:
The admin panel requires a seperate login that can be found at domain-name/modules/realty/admin.php
I have given REGISTERED USERS admin rights to the module and it works fine.
However, when I give ANONYMOUS users admin rights to the module, when you go to the above URL it says "Sorry, you do not have permission to access this module".
In the "admin_header.php" file of this module we've found this section of code which is relevant:
include("../../../mainfile.php");
include_once(XOOPS_ROOT_PATH."/class/xoopsmodule.php");
include(XOOPS_ROOT_PATH."/include/cp_functions.php");
if ( $xoopsUser ) {
$xoopsModule = XoopsModule::getByDirname("realty");
if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
redirect_header(XOOPS_URL."/",3,_NOPERM);
exit();
}
} else {
redirect_header(XOOPS_URL."/",3,_NOPERM);
exit();
}
if ( @file_exists("../../../language/".$xoopsConfig['language']."/admin.php") ) {
include("../../../language/".$xoopsConfig['language']."/admin.php");
} else {
include("../../../language/english/admin.php");
}
?>
I have been told that "3" is the anonymous user group, which makes me believe this code is saying "if the user is from the anonymous group, forward him to a NO PERMISSION page".
If ANYONE knows what changes to make to allow anonymous users admin access to this module, please help me :)
Yes, I know it's BAD to allow Anymous users admin rights -- but since this module requires you to login twice, it makes sense.
Thank you,
Jamie