Merge pull request #7299 from overleaf/jpa-handle-deleted-user

[web] redirect deleted users from settings page to log out page

GitOrigin-RevId: c033387ac9282a8e629455a4d3136655575c078a
This commit is contained in:
Jakob Ackermann 2022-03-31 08:55:03 +01:00 committed by Copybot
parent d949567391
commit 2677984b93

View file

@ -107,6 +107,10 @@ const UserPagesController = {
if (err != null) {
return next(err)
}
if (!user) {
// The user has just deleted their account.
return res.redirect('/logout')
}
res.render('user/settings', {
title: 'account_settings',
user,