Minahito
minah****@users*****
2005年 12月 25日 (日) 00:01:09 JST
Index: xoops2jp/html/modules/user/admin/actions/UserUserDeleteAction.class.php diff -u /dev/null xoops2jp/html/modules/user/admin/actions/UserUserDeleteAction.class.php:1.1.2.1 --- /dev/null Sun Dec 25 00:01:09 2005 +++ xoops2jp/html/modules/user/admin/actions/UserUserDeleteAction.class.php Sun Dec 25 00:01:09 2005 @@ -0,0 +1,50 @@ +<?php + +require_once XOOPS_MODULE_PATH . "/user/class/AbstractDeleteAction.class.php"; + +class UserUserDeleteAction extends User_AbstractDeleteAction +{ + function &getHandler() + { + $handler =& xoops_gethandler('user'); + return $handler; + } + + function &getDeleteHandler() + { + $handler =& xoops_gethandler('member'); + return $handler; + } + + function getId() + { + $id = isset($_REQUEST['uid']) ? intval($_REQUEST['uid']) : 0; + + // + // Don't allow to delete super administrator. + // + if ($id == 1) + $id = 0; + + return $id; + } + + function executeViewInput(&$controller, &$xoopsUser, &$renderSystem) + { + $renderSystem->setTemplateName("user_delete_confirm.html"); + $renderSystem->setAttribute("user", $this->mObject); + } + + function executeViewSuccess(&$controller,&$xoopsUser,&$renderSystem) + { + XCube_Utils::redirectHeader("index.php",1,"*SUCCESS*"); + } + + function executeViewError(&$controller, &$xoopsUser, &$renderSystem) + { + XCube_Utils::redirectHeader("index.php", 1, "*DELETE ERROR*"); + } + +} + +?> \ No newline at end of file