mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-09 11:43:10 +02:00
Batch mirror fix
This commit is contained in:
1 parent
1badb2bbcc
commit
59d0e73c35
13 files changed
+68
-80
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user