mirror of
https://github.com/documize/community.git
synced 2025-07-24 07:39:43 +02:00
update user firstname and lastname when login with CAS
This commit is contained in:
parent
fbb73560c0
commit
399c36611f
1 changed files with 4 additions and 4 deletions
|
@ -113,10 +113,10 @@ func (h *Handler) Authenticate(w http.ResponseWriter, r *http.Request) {
|
|||
u.GlobalAdmin = false
|
||||
u.Email = userInfo.User
|
||||
|
||||
firstName := userInfo.Attributes.Get("first_name")
|
||||
lastName := userInfo.Attributes.Get("last_name")
|
||||
if firstName != "" || lastName != "" {
|
||||
u.Initials = stringutil.MakeInitials(firstName, lastName)
|
||||
u.Firstname = userInfo.Attributes.Get("first_name")
|
||||
u.Lastname = userInfo.Attributes.Get("last_name")
|
||||
if u.Firstname != "" || u.Lastname != "" {
|
||||
u.Initials = stringutil.MakeInitials(u.Firstname, u.Lastname)
|
||||
}else {
|
||||
u.Initials = stringutil.MakeInitials(userInfo.User, "")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue