mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-14 14:49:46 +00:00
Fix SMTP auth logic
This commit is contained in:
1 parent
1126522a99
commit
405ee14711
4 files changed
+14
-18
No files matched your search
+2
-6
@@ -161,12 +161,8 @@ func UserSignIn(uname, passwd string) (*User, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if u.LoginType == NOTYPE {
|
||||
if has {
|
||||
u.LoginType = PLAIN
|
||||
} else {
|
||||
return nil, ErrUserNotExist
|
||||
}
|
||||
if u.LoginType == NOTYPE && has {
|
||||
u.LoginType = PLAIN
|
||||
}
|
||||
|
||||
// For plain login, user must exist to reach this line.
|
||||
|
||||
Reference in new issue
Block a user