Minahito
minah****@users*****
2006年 4月 11日 (火) 18:38:14 JST
Index: xoops2jp/html/modules/user/kernel/UserEventFunction.class.php diff -u xoops2jp/html/modules/user/kernel/UserEventFunction.class.php:1.1.2.9 xoops2jp/html/modules/user/kernel/UserEventFunction.class.php:1.1.2.10 --- xoops2jp/html/modules/user/kernel/UserEventFunction.class.php:1.1.2.9 Tue Mar 28 22:32:19 2006 +++ xoops2jp/html/modules/user/kernel/UserEventFunction.class.php Tue Apr 11 18:38:14 2006 @@ -98,14 +98,21 @@ $controller->mRoot->mLanguageManager->loadModuleLanguage('user'); $memberHandler=&xoops_gethandler('member'); - $user =& $memberHandler->loginUser(addslashes($_POST['uname']),addslashes($_POST['pass'])); - - if($user===false) { + + $criteria =& new CriteriaCompo(); + $criteria->add(new Criteria('uname', xoops_getrequest('uname'))); + $criteria->add(new Criteria('pass', md5(xoops_getrequest('pass')))); + + $userArr =& $memberHandler->getUsers($criteria); + + if (count($userArr) != 1) { $eventArgs->setRedirectUrl(XOOPS_URL."/user.php"); $eventArgs->setRedirectMessage(_US_INCORRECTLOGIN); return; } - + + $user =& $userArr[0]; + if($user->get('level')==0) { $eventArgs->setRedirectUrl(XOOPS_URL); $eventArgs->setRedirectMessage(_US_NOACTTPADM);