UsersDao: fix wrong attribute used in setUserAsActive

Co-authored-by: Marcel Hibbe <dev@mhibbe.de>
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey 2022-12-14 12:10:36 +01:00 committed by Andy Scherzinger
parent 962b1d4e3a
commit 25dd46f95a
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B

View File

@ -82,10 +82,9 @@ abstract class UsersDao {
abstract fun getUserWithUsernameAndServer(username: String, server: String): Maybe<UserEntity>
@Query(
"UPDATE User " +
"SET current = CASE " +
"UPDATE User SET current = CASE " +
"WHEN id == :id THEN 1 " +
"WHEN userId != :id THEN 0 " +
"WHEN id != :id THEN 0 " +
"END"
)
abstract fun setUserAsActiveWithId(id: Long): Int