userInfoClass(); } function userInfoClass() { global $xoopsUser,$xoopsModule; $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; $mid=$xoopsModule->getVar('mid'); if (empty($mid) && function_exists('xoops_gethandler')){ $module_handler =& xoops_gethandler('module'); $module =& $module_handler->getByDirname($mydirname); $mid = $module->getVar('mid'); } if(empty($xoopsUser)){ $this->is_logon = false; } else { $this->is_logon = true; $this->login_name = $xoopsUser->getVar('name'); $this->user_name = $xoopsUser->getVar('uname'); if($this->user_name == '') { $this->user_name = $this->login_name; } $this->user_id = $xoopsUser->getVar('uid'); $this->user_password = $xoopsUser->getVar('pass'); $this->user_email = $xoopsUser->getVar('email'); $this->user_homepage = $xoopsUser->getVar('url'); $this->user_regdate = $xoopsUser->getVar('user_regdate'); $this->user_aim = $xoopsUser->getVar('user_aim'); $this->user_yim = $xoopsUser->getVar('user_yim'); $this->user_group = $xoopsUser->getGroups(); $moduleperm_handler =& xoops_gethandler('groupperm'); if ($moduleperm_handler->checkRight('module_read', $mid, $xoopsUser->getGroups())) { $this->is_mod_read = true; } else { $this->is_mod_read = false; } if (in_array(XOOPS_GROUP_ADMIN, $this->user_group)){ $this->is_mod_admin = true; } else { $this->is_mod_admin = $xoopsUser->isAdmin($mid); } } } /* if ($xoopsUser) { if (!$moduleperm_handler->checkRight('module_read', $xoopsModule->getVar('mid'), $xoopsUser->getGroups())) { redirect_header(XOOPS_URL."/user.php",1,_NOPERM); exit(); } $xoopsUserIsAdmin = $xoopsUser->isAdmin($xoopsModule->getVar('mid')); } else { if (!$moduleperm_handler->checkRight('module_read', $xoopsModule->getVar('mid'), XOOPS_GROUP_ANONYMOUS)) { redirect_header(XOOPS_URL."/user.php",1,_NOPERM);���R�R exit(); */ } endif; ?>