mirror of
https://github.com/documize/community.git
synced 2025-07-25 16:19:46 +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.GlobalAdmin = false
|
||||||
u.Email = userInfo.User
|
u.Email = userInfo.User
|
||||||
|
|
||||||
firstName := userInfo.Attributes.Get("first_name")
|
u.Firstname = userInfo.Attributes.Get("first_name")
|
||||||
lastName := userInfo.Attributes.Get("last_name")
|
u.Lastname = userInfo.Attributes.Get("last_name")
|
||||||
if firstName != "" || lastName != "" {
|
if u.Firstname != "" || u.Lastname != "" {
|
||||||
u.Initials = stringutil.MakeInitials(firstName, lastName)
|
u.Initials = stringutil.MakeInitials(u.Firstname, u.Lastname)
|
||||||
}else {
|
}else {
|
||||||
u.Initials = stringutil.MakeInitials(userInfo.User, "")
|
u.Initials = stringutil.MakeInitials(userInfo.User, "")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue