9
more issue
okie this is what I have:
include("../../mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
global $xoopsUser;
if (is_object($xoopsUser)) {
$uid = $xoopsUser->getVar('uid'); // I saw it another module
$uname_ = $xoopsUser->getVar('uname'); // I saw it another module
echo "check if user..
";
if ($xoopsUser->isAdmin()) echo "xoopsUser->isAdmin() result is: True
";
if ($xoops_isadmin) "xoops_admin is: True
";
}
if ($uname == "admin") {
echo "If statemen via uname is: True";
}
else {
echo "uname != admin, instead uname is: $uname";
}
?>
As Admin I get the following check if user..
xoopsUser->isAdmin() result is: True
uname != admin, instead uname is:
As user I get check if user..
uname != admin, instead uname is:
not as user uname != admin, instead uname is:
---------------------
$xoopsUser->isAdmin() works fine, but if a non-admin login is, the page wont be displayed - it halts any things after $xoopsUser->isAdmin() in php file.
Another question: Why am I unable to get uid & uname. I have used it at other places too, it works fine.
Am I doing sumthing really stupid ?The file is located: root/modules/modulename/filename.php
also, there are no blocks on this module - does it matter?
Thank you for time