diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js index ed25277fa9..53de38b08c 100644 --- a/src/controllers/authentication.js +++ b/src/controllers/authentication.js @@ -234,7 +234,10 @@ authenticationController.login = async (req, res, next) => { user.getUsernameByEmail(req.body.username, next); }, function (username, next) { - req.body.username = username || req.body.username; + if (username !== '[[global:guest]]') { + req.body.username = username; + } + (res.locals.continueLogin || continueLogin)(strategy, req, res, next); }, ], next);