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 eca8ffda70)
This commit is contained in:
Livio Spring 2024-05-29 17:45:46 +02:00
parent 8ce3af2f9d
commit 0b82fc1ed0
No known key found for this signature in database
GPG Key ID: 26BB1C2FA5952CF0

View File

@ -33,7 +33,7 @@ SELECT
, (SELECT array_agg(ll.login_name) login_names FROM projections.login_names3 ll , (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 WHERE u.instance_id = ll.instance_id AND u.id = ll.user_id
GROUP BY ll.user_id, ll.instance_id) AS login_names 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.first_name
, h.last_name , h.last_name
, h.nick_name , h.nick_name