mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
[fix] Always redirect to portal when calling logout page.
This commit is contained in:
parent
01e2b20e02
commit
e7b39d4d29
1 changed files with 4 additions and 1 deletions
|
@ -808,12 +808,15 @@ function logout()
|
|||
-- We need this call since we are in a POST request
|
||||
local args = ngx.req.get_uri_args()
|
||||
|
||||
-- Delete user cookie if logged in (that should always be the case)
|
||||
if is_logged_in() then
|
||||
cache:delete("session_"..authUser)
|
||||
cache:delete(authUser.."-"..conf["ldap_identifier"]) -- Ugly trick to reload cache
|
||||
flash("info", t("logged_out"))
|
||||
return redirect(conf.portal_url)
|
||||
end
|
||||
|
||||
-- Redirect to portal anyway
|
||||
return redirect(conf.portal_url)
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue