minor fix on #1694

This commit is contained in:
Unknwon 2015-11-21 12:58:31 -05:00
parent 2b1e955f91
commit eea2e05da6
4 changed files with 20 additions and 21 deletions

View file

@ -225,10 +225,9 @@ func DeleteSource(source *LoginSource) error {
// |_______ \/_______ /\____|__ /____|
// \/ \/ \/
// Query if name/passwd can login against the LDAP directory pool
// Create a local user if success
// Return the same LoginUserPlain semantic
// FIXME: https://github.com/gogits/gogs/issues/672
// LoginUserLDAPSource queries if name/passwd can login against the LDAP directory pool,
// and create a local user if success when enabled.
// It returns the same LoginUserPlain semantic.
func LoginUserLDAPSource(u *User, name, passwd string, source *LoginSource, autoRegister bool) (*User, error) {
cfg := source.Cfg.(*LDAPConfig)
directBind := (source.Type == DLDAP)