diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-26 22:34:48 -0600 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-26 22:34:48 -0600 |
commit | 59d0e73c3507296b31c8e741b44afc7bfe1eb695 (patch) | |
tree | 79970b755e0c5309b0f05dcd45053f91500ba85b /routers/user/user.go | |
parent | 1badb2bbccfe81303f69f8dedf57c22fb89d4b99 (diff) | |
download | gitea-59d0e73c3507296b31c8e741b44afc7bfe1eb695.tar.gz gitea-59d0e73c3507296b31c8e741b44afc7bfe1eb695.zip |
Batch mirror fix
Diffstat (limited to 'routers/user/user.go')
-rw-r--r-- | routers/user/user.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/routers/user/user.go b/routers/user/user.go index 75314237dd..fe53896e41 100644 --- a/routers/user/user.go +++ b/routers/user/user.go @@ -91,12 +91,14 @@ func SignInPost(ctx *middleware.Context, form auth.LogInForm) { var user *models.User var err error - // try to login against LDAP if defined - if base.LdapAuth { + if base.Service.LdapAuth { user, err = models.LoginUserLdap(form.UserName, form.Password) + if err != nil { + log.Error("Fail to login through LDAP: %v", err) + } } // try local if not LDAP or it's failed - if (!base.LdapAuth) || (err != nil) { + if !base.Service.LdapAuth || err != nil { user, err = models.LoginUserPlain(form.UserName, form.Password) } if err != nil { |