3
0

Fix nil-pointer panic in auth flow

This commit is contained in:
Denis Arh 2021-07-23 13:22:53 +02:00
parent 02b137d19e
commit a547377f23

View File

@ -124,7 +124,7 @@ func (h *AuthHandlers) confirmEmail(req *request.AuthReq) (err error) {
// redirect to the right page
// not doing this here and relying on handler on subseq. request
// will cause alerts to be removed
if req.AuthUser.User == nil {
if req.AuthUser == nil && req.AuthUser.User == nil {
req.RedirectTo = GetLinks().Login
} else {
req.RedirectTo = GetLinks().Profile