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:
parent
1ded188039
commit
f3c3dcdda1
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue