Prevent bug where user account not deleted if changes were pending
This commit is contained in:
parent
00584c2f27
commit
ac9650977b
|
@ -415,7 +415,10 @@ impl<UserData: Serialize + DeserializeOwned> RegisteredUser<UserData> {
|
|||
///
|
||||
/// # Errors
|
||||
/// Can error if the a database error occurs
|
||||
pub fn delete(self) -> Result<()> {
|
||||
pub fn delete(mut self) -> Result<()> {
|
||||
// Prevent re-saving on drop
|
||||
self.has_changed = false;
|
||||
|
||||
let certificates = self.all_certificates();
|
||||
|
||||
(&self.manager.users, &self.manager.certificates, &self.manager.usernames).transaction(|(tx_usr, tx_crt, tx_nam)| {
|
||||
|
|
Loading…
Reference in a new issue