diff --git a/src/api/admin.rs b/src/api/admin.rs index 37b03c1..68a0138 100644 --- a/src/api/admin.rs +++ b/src/api/admin.rs @@ -171,6 +171,7 @@ fn deauth_user(uuid: String, _token: AdminToken, conn: DbConn) -> EmptyResult { None => err!("User doesn't exist"), }; + Device::delete_all_by_user(&user.uuid, &conn)?; user.reset_security_stamp(); user.save(&conn) diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs index beeb74b..bc2d286 100644 --- a/src/api/core/accounts.rs +++ b/src/api/core/accounts.rs @@ -322,6 +322,7 @@ fn post_sstamp(data: JsonUpcase, headers: Headers, conn: DbConn) - err!("Invalid password") } + Device::delete_all_by_user(&user.uuid, &conn)?; user.reset_security_stamp(); user.save(&conn) }