User can delete his own 2FA login history
This commit is contained in:
@ -313,4 +313,11 @@ impl EntityManager<User> {
|
||||
user
|
||||
})
|
||||
}
|
||||
|
||||
pub fn clear_2fa_login_history(&mut self, id: &UserID) -> bool {
|
||||
self.update_user(id, |mut user| {
|
||||
user.last_successful_2fa = Default::default();
|
||||
user
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user