Changeset 788 for trunk/xpressme_integration_kit/class
- Timestamp:
- Jun 3, 2011, 10:27:36 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/class/userInfo_class.php
r784 r788 12 12 class userInfoClass { 13 13 var $is_logon; 14 var $login_name; 14 15 var $user_name; 15 16 var $user_id; 17 var $user_password; 18 var $user_email; 19 var $user_homepage; 20 var $user_regdate; 21 var $user_aim; 22 var $user_yim; 16 23 var $user_group; 17 24 var $is_mod_read; … … 26 33 global $xoopsUser,$xoopsModule; 27 34 35 $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; 36 $mid=$xoopsModule->getVar('mid'); 37 if (empty($mid) && function_exists('xoops_gethandler')){ 38 $module_handler =& xoops_gethandler('module'); 39 $module =& $module_handler->getByDirname($mydirname); 40 $mid = $module->getVar('mid'); 41 } 42 28 43 if(empty($xoopsUser)){ 29 44 $this->is_logon = false; 30 45 } else { 31 46 $this->is_logon = true; 47 $this->login_name = $xoopsUser->getVar('name'); 32 48 $this->user_name = $xoopsUser->getVar('uname'); 33 49 if($this->user_name == '') { 34 $this->user_name = $ xoopsUser->getVar('name');50 $this->user_name = $this->login_name; 35 51 } 36 52 $this->user_id = $xoopsUser->getVar('uid'); 53 $this->user_password = $xoopsUser->getVar('pass'); 54 $this->user_email = $xoopsUser->getVar('email'); 55 $this->user_homepage = $xoopsUser->getVar('url'); 56 $this->user_regdate = $xoopsUser->getVar('user_regdate'); 57 $this->user_aim = $xoopsUser->getVar('user_aim'); 58 $this->user_yim = $xoopsUser->getVar('user_yim'); 37 59 $this->user_group = $xoopsUser->getGroups(); 60 38 61 $moduleperm_handler =& xoops_gethandler('groupperm'); 39 62 if ($moduleperm_handler->checkRight('module_read', 40 $ xoopsModule->getVar('mid'), $xoopsUser->getGroups())) {63 $mid, $xoopsUser->getGroups())) { 41 64 $this->is_mod_read = true; 42 65 } else { 43 66 $this->is_mod_read = false; 44 67 } 45 $is_mod_admin = $xoopsUser->isAdmin($xoopsModule->getVar('mid')); 68 if (in_array(XOOPS_GROUP_ADMIN, $this->user_group)){ 69 $this->is_mod_admin = true; 70 } else { 71 $this->is_mod_admin = $xoopsUser->isAdmin($mid); 72 } 46 73 } 47 74 } … … 58 85 if (!$moduleperm_handler->checkRight('module_read', 59 86 $xoopsModule->getVar('mid'), XOOPS_GROUP_ANONYMOUS)) { 60 redirect_header(XOOPS_URL."/user.php",1,_NOPERM); ©RR87 redirect_header(XOOPS_URL."/user.php",1,_NOPERM);���R�R 61 88 exit(); 62 89 */
Note: See TracChangeset
for help on using the changeset viewer.