From 00653e52ee078ae76872f722f056805fb75d98af Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Sun, 8 Feb 2015 01:49:51 +0200 Subject: Get username, name, surname and e-mail from LDAP server --- models/login.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'models') diff --git a/models/login.go b/models/login.go index 125e110a..1dc1b6ca 100644 --- a/models/login.go +++ b/models/login.go @@ -231,7 +231,7 @@ func UserSignIn(uname, passwd string) (*User, error) { // Return the same LoginUserPlain semantic // FIXME: https://github.com/gogits/gogs/issues/672 func LoginUserLdapSource(u *User, name, passwd string, sourceId int64, cfg *LDAPConfig, autoRegister bool) (*User, error) { - mail, logged := cfg.Ldapsource.SearchEntry(name, passwd) + name, fn, sn, mail, logged := cfg.Ldapsource.SearchEntry(name, passwd) if !logged { // User not in LDAP, do nothing return nil, ErrUserNotExist @@ -247,6 +247,7 @@ func LoginUserLdapSource(u *User, name, passwd string, sourceId int64, cfg *LDAP u = &User{ Name: name, + FullName: fn + " " + sn, LoginType: LDAP, LoginSource: sourceId, LoginName: name, -- cgit v1.2.3