mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -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;
|
let skipVerification = false;
|
||||||
|
|
||||||
return models.User.getByEmail(object.username).then((user) => {
|
return models.User.getByEmail(object.username).then((user) => {
|
||||||
if (!user.hasLoggedIn()) {
|
if (user && !user.hasLoggedIn()) {
|
||||||
skipVerification = true;
|
skipVerification = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue