0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Added undefined check for user in session service (#21773)

No issue

- user is undefined in the case when emailId doesn't exist in the db.
This commit is contained in:
Princi Vershwal 2024-12-02 13:38:24 +05:30 committed by GitHub
parent 1ded188039
commit f3c3dcdda1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,7 +31,7 @@ const controller = {
let skipVerification = false;
return models.User.getByEmail(object.username).then((user) => {
if (!user.hasLoggedIn()) {
if (user && !user.hasLoggedIn()) {
skipVerification = true;
}