Minahito
minah****@users*****
2006年 9月 28日 (木) 14:04:20 JST
Index: xoops2jp/html/modules/user/preload/Primary/Primary.class.php diff -u xoops2jp/html/modules/user/preload/Primary/Primary.class.php:1.1.2.7 xoops2jp/html/modules/user/preload/Primary/Primary.class.php:1.1.2.7.2.1 --- xoops2jp/html/modules/user/preload/Primary/Primary.class.php:1.1.2.7 Sat Sep 2 15:10:02 2006 +++ xoops2jp/html/modules/user/preload/Primary/Primary.class.php Thu Sep 28 14:04:20 2006 @@ -11,7 +11,7 @@ function preFilter() { $root =& XCube_Root::getSingleton(); - $root->mDelegateManager->add("Site.Login", "User_Login::login"); + $this->mController->mSetupUser->add("User_Utils::setupUser"); $file = XOOPS_ROOT_PATH . "/modules/user/kernel/LegacypageFunctions.class.php"; @@ -36,24 +36,24 @@ * * @todo We may move this class to other file. */ -class User_Login +class User_Utils { - function login(&$xoopsUser) + function setupUser(&$principal, &$controller, &$context) { - if (is_object($xoopsUser)) { + if (is_object($controller->mXoopsUser)) { return; } if (!empty($_SESSION['xoopsUserId'])) { - $memberHandler=xoops_gethandler('member'); + $memberHandler = xoops_gethandler('member'); $user =& $memberHandler->getUser($_SESSION['xoopsUserId']); - $xoopsUser = $user; - if(!is_object($xoopsUser)) { - $xoopsUser = null; + $controller->mXoopsUser = $user; + if (!is_object($controller->mXoopsUser)) { + $controller->mXoopsUser = null; $_SESSION = array(); } else { - $xoopsUser->setGroups($_SESSION['xoopsUserGroups']); + $controller->mXoopsUser->setGroups($_SESSION['xoopsUserGroups']); // // Use 'mysession'