1
0
Fork 0
forked from forgejo/forgejo

golint fixed for modules/auth

This commit is contained in:
Lunny Xiao 2016-11-27 14:03:59 +08:00
parent e6da2cf2cb
commit ec87a75c00
16 changed files with 103 additions and 24 deletions

View file

@ -502,7 +502,7 @@ func LoginViaSMTP(user *User, login, password string, sourceID int64, cfg *SMTPC
// LoginViaPAM queries if login/password is valid against the PAM,
// and create a local user if success when enabled.
func LoginViaPAM(user *User, login, password string, sourceID int64, cfg *PAMConfig, autoRegister bool) (*User, error) {
if err := pam.PAMAuth(cfg.ServiceName, login, password); err != nil {
if err := pam.Auth(cfg.ServiceName, login, password); err != nil {
if strings.Contains(err.Error(), "Authentication failure") {
return nil, ErrUserNotExist{0, login, 0}
}