mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Show error message when a disabled user tries to authenticate
This commit is contained in:
parent
b4372dff36
commit
eacb0a452e
@ -46,17 +46,15 @@ export default {
|
||||
if (
|
||||
currentUser &&
|
||||
(await bcrypt.compareSync(password, currentUser.password)) &&
|
||||
currentUser.disabled == false
|
||||
!currentUser.disabled
|
||||
) {
|
||||
delete currentUser.password
|
||||
return encode(currentUser)
|
||||
}
|
||||
else if (currentUser &&
|
||||
} else if (currentUser &&
|
||||
currentUser.disabled
|
||||
){
|
||||
) {
|
||||
throw new AuthenticationError('Your account has been disabled.')
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
throw new AuthenticationError('Incorrect email address or password.')
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user