Fix logic bug on sign in
This commit is contained in:
parent
85e165bd29
commit
99780104e0
@ -130,7 +130,7 @@ impl Handler<LoginRequest> for UsersActor {
|
|||||||
}
|
}
|
||||||
Ok(None) => MessageResult(LoginResult::AccountNotFound),
|
Ok(None) => MessageResult(LoginResult::AccountNotFound),
|
||||||
Ok(Some(user)) => {
|
Ok(Some(user)) => {
|
||||||
if self
|
if !self
|
||||||
.manager
|
.manager
|
||||||
.verify_user_password(&user.uid, &msg.password)
|
.verify_user_password(&user.uid, &msg.password)
|
||||||
.unwrap_or(false)
|
.unwrap_or(false)
|
||||||
|
@ -163,6 +163,10 @@ pub async fn login_route(
|
|||||||
danger = Some("Your account is disabled!".to_string());
|
danger = Some("Your account is disabled!".to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LoginResult::Error => {
|
||||||
|
danger = Some("An unkown error occured while trying to sign you in!".to_string());
|
||||||
|
}
|
||||||
|
|
||||||
c => {
|
c => {
|
||||||
log::warn!(
|
log::warn!(
|
||||||
"Failed login for ip {:?} / username {}: {:?}",
|
"Failed login for ip {:?} / username {}: {:?}",
|
||||||
|
Loading…
Reference in New Issue
Block a user