Allow switching auth types

This commit is contained in:
M66B
2022-07-16 16:24:54 +02:00
parent c10abc0db0
commit 7d92c52bb9
8 changed files with 29 additions and 49 deletions

View File

@@ -116,12 +116,12 @@ public interface DaoIdentity {
int setIdentityPassword(long account, String user, String password, int auth_type, String domain);
@Query("UPDATE identity" +
" SET password = :password, auth_type = :new_auth_type" +
" SET password = :password, auth_type = :new_auth_type, provider = :provider" +
" WHERE account = :account" +
" AND user = :user" +
" AND auth_type = :auth_type" +
" AND NOT (password IS :password AND auth_type IS :new_auth_type)")
int setIdentityPassword(long account, String user, String password, int auth_type, int new_auth_type);
" AND NOT (password IS :password AND auth_type IS :new_auth_type AND provider = :provider)")
int setIdentityPassword(long account, String user, String password, int auth_type, int new_auth_type, String provider);
@Query("UPDATE identity" +
" SET fingerprint = :fingerprint" +