OSDN Git Service

add ACS webapp, sql, htdocs
[acs/acs.git] / webapp / modules / User / actions / LogoutAction.class.php
diff --git a/webapp/modules/User/actions/LogoutAction.class.php b/webapp/modules/User/actions/LogoutAction.class.php
new file mode 100644 (file)
index 0000000..366f0fa
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+/**
+ * ¥í¥°¥¢¥¦¥È½èÍý
+ *
+ * @author  y-yuki
+ * @version $Revision: 1.1 $ $Date: 2008/03/24 07:09:27 $
+ */
+class LogoutAction extends BaseAction
+{
+       function execute() {
+
+               $context = &$this->getContext();
+               $user = $context->getUser();
+
+               // ¥¿¥¤¥à¥¹¥¿¥ó¥×¹¹¿·
+               $ret = ACSUser::upd_login_date($user);
+               
+               if (!$ret) {
+                       return View::ERROR;
+               }
+               
+               // ¥í¥°¥¢¥¦¥È¥æ¡¼¥¶ID¤¬¤Ê¤¯¤Ê¤ë¤ÈBaseAction¤Çǧ¾Ú¤Ç¤­¤Ê¤¯¤Ê¤ë
+               $user->removeAttribute('login_user_id');
+               $user->removeAttribute('getLogoutDateEverytime');
+               
+               return View::SUCCESS;
+       }
+       
+       /**
+        * Ç§¾Ú¥Á¥§¥Ã¥¯¤ò¹Ô¤¦¤«
+        * ¥¢¥¯¥·¥ç¥ó¤ò¼Â¹Ô¤¹¤ëÁ°¤Ë¡¢Ç§¾Ú¥Á¥§¥Ã¥¯¤¬É¬Íפ«ÀßÄꤹ¤ë
+        * @access  public
+        * @return  boolean Ç§¾Ú¥Á¥§¥Ã¥¯Í­Ìµ¡Êtrue:ɬÍס¢false:ÉÔÍסË
+        */
+       public function isSecure()
+       {
+               return false;
+       }
+}
+
+?>