From 0b82fc1ed0ea48ef83e4802ffbb24634c64d6b89 Mon Sep 17 00:00:00 2001 From: Livio Spring Date: Wed, 29 May 2024 17:45:46 +0200 Subject: [PATCH] fix(login): correctly set preferred login name in the login ui (#8038) # Which Problems Are Solved A customer noted that after upgrade to 2.53.0, users were no longer able to reset their passwords through the login UI. This was due to a accidental change in https://github.com/zitadel/zitadel/pull/7969 # How the Problems Are Solved The `preferred_login_name` is now correctly read from the database. # Additional Changes None. # Additional Context relates to #7969 (cherry picked from commit eca8ffda709e701c14d196d43c834d072cf4dec1) --- internal/user/repository/view/user_by_id.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/user/repository/view/user_by_id.sql b/internal/user/repository/view/user_by_id.sql index fa85fc43f4..1e21e59486 100644 --- a/internal/user/repository/view/user_by_id.sql +++ b/internal/user/repository/view/user_by_id.sql @@ -33,7 +33,7 @@ SELECT , (SELECT array_agg(ll.login_name) login_names FROM projections.login_names3 ll WHERE u.instance_id = ll.instance_id AND u.id = ll.user_id GROUP BY ll.user_id, ll.instance_id) AS login_names - , l.login_name + , l.login_name as preferred_login_name , h.first_name , h.last_name , h.nick_name