mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-29 18:42:15 +00:00
fix: preferred login name (#231)
* fix: add preferred login name to my user sessions and get user info from view * fix: my user in auth
This commit is contained in:
@@ -8,6 +8,14 @@ import (
|
||||
"github.com/caos/zitadel/internal/errors"
|
||||
)
|
||||
|
||||
func (s *Server) GetMyUser(ctx context.Context, _ *empty.Empty) (*UserView, error) {
|
||||
user, err := s.repo.MyUser(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return userViewFromModel(user), nil
|
||||
}
|
||||
|
||||
func (s *Server) GetMyUserProfile(ctx context.Context, _ *empty.Empty) (*UserProfileView, error) {
|
||||
profile, err := s.repo.MyProfile(ctx)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user