소스 검색

[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) {