1
I have this bit of code:
< ?php
include '../../mainfile.php';
function dl_show($options) {
global $xoopsUser;
$domainListing[0] = "domain1.com";
$domainListing[1] = "domain2.com";
$domainListing[2] = "domain3.com";
$form['domainList'] = $domainListing;
if ($xoopsUser) {
$form['myUserName'] = $xoopsUser->getVar('uname');
}
return $form;
}
?>
This is curretly in a block, and no matter what I do, I can't seem to get $xoopsUser to be anything valid. Yes,I am logged in. I've taken out the "global $xoopsUser" statement, searched the forums, and meandered through the source code of a half-dozen modules. If I put the same code in my module's index.php, it gets the user without a problem.
I'm tearing my hair out. There's got to be something I'm not understanding about the differences between a module and a block inside a module.
Any suggestions?
Thanks!
Tina Marie