Skip to content

Commit

Permalink
fix #2630 【システム】ログアウトしても代理ログイン情報が記録されたまま (#2682)
Browse files Browse the repository at this point in the history
Co-authored-by: Đỗ Văn Hùng <dovanhungk57@gmail.com>
  • Loading branch information
HungDV2022 and dovanhung committed Aug 17, 2023
1 parent 4eb2c42 commit da26740
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/baser-core/src/Controller/Admin/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ public function back_agent(UsersServiceInterface $service)
*/
public function logout(UsersServiceInterface $service)
{
// 代理ログインした場合、ログアウト前にセッションを削除する。
if (BcUtil::isAgentUser()) {
$session = $this->request->getSession();
$session->delete('AuthAgent');
}

/* @var User $user */
$user = $this->Authentication->getIdentity();
$service->logout($this->request, $this->response, $user->id);
Expand Down

0 comments on commit da26740

Please sign in to comment.