Simplify/improve updating passwords

This commit is contained in:
M66B
2019-10-11 15:32:03 +02:00
parent 1e9a77e249
commit 2f771c6fa5
5 changed files with 25 additions and 24 deletions

View File

@@ -82,6 +82,12 @@ public interface DaoIdentity {
@Query("UPDATE identity SET password = :password WHERE id = :id")
int setIdentityPassword(long id, String password);
@Query("UPDATE identity SET password = :password" +
" WHERE account = :account" +
" AND user = :user" +
" AND host LIKE :domain")
int setIdentityPassword(long account, String user, String password, String domain);
@Query("UPDATE identity SET last_connected = :last_connected WHERE id = :id")
int setIdentityConnected(long id, long last_connected);