mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Merge pull request #915 from Lafriks/dev
Get username, name, surname and e-mail from LDAP server
This commit is contained in:
		| @@ -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, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user