浏览代码

[Web] Fix logout after oauth2

andryyy 5 年之前
父节点
当前提交
c3c584a075
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      data/web/oauth/profile.php

+ 4 - 0
data/web/oauth/profile.php

@@ -22,6 +22,10 @@ if (!empty($mailbox)) {
       'modified' => (!empty($mailbox['modified']) ? $mailbox['modified'] : ''),
       'active' => (!empty($mailbox['active']) ? $mailbox['active'] : ''),
     ));
+    if ($GLOBALS['OAUTH2_FORGET_SESSION_AFTER_LOGIN'] === true) {
+      session_unset();
+      session_destroy();
+    }
     exit;
   }
   if ($GLOBALS['OAUTH2_FORGET_SESSION_AFTER_LOGIN'] === true) {