Bugfix: drop token after use

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2024-05-19 12:13:48 +00:00
parent 3107bd1b21
commit 1d1044980c
4 changed files with 15 additions and 7 deletions

View File

@@ -137,6 +137,11 @@ public class User {
Database.open().query(sql).compile().run();
}
public void dropPasswordToken() throws SQLException {
Database.open().update(TABLE_NAME).set(RESET_TOKEN,null).where(EMAIL,email).compile().run();
}
/**
* Withdraw a specific permission from the user object.
* Updated permission flag will be written to db.