5
Quote:
Dave_L wrote:
$xoopsUser is the currently logged-in user, if that's what you mean.
I played with that a little in xoopsblock.php... but it always returned a uid of 1... Any hints? (code fragment below)
le="color: #000000"><?php global $xoopsUser; // only needed if inside a function if (is_object($xoopsUser)) { $uid = $xoopsUser->getVar('uid'); $uname = $xoopsUser->getVar('uname'); } else { $uid = 0; $uname = ""; } ... if ( $c_type == 'H' ) { $content = str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'N')); $content = str_replace('{X_UID}', $uid, $content); return $content; // The above 3 lines replace the existing line below // return str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'N')); }