Minor simplification.
This commit is contained in:
parent
13b7b72865
commit
d1800fe86a
@ -203,12 +203,7 @@ Api.fn.session = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var user = $waitPromise(this.xo.users.first({'email': p_email}));
|
var user = $waitPromise(this.xo.users.first({'email': p_email}));
|
||||||
if (!user)
|
if (!(user && user.checkPassword(p_pass)))
|
||||||
{
|
|
||||||
throw Api.err.INVALID_CREDENTIAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!user.checkPassword(p_pass))
|
|
||||||
{
|
{
|
||||||
throw Api.err.INVALID_CREDENTIAL;
|
throw Api.err.INVALID_CREDENTIAL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user