forked from forgejo/forgejo
Fix SMTP auth logic
This commit is contained in:
parent
1126522a99
commit
405ee14711
4 changed files with 14 additions and 18 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue