|
@@ -388,7 +388,7 @@ func LoginUserSMTPSource(u *User, name, passwd string, sourceId int64, cfg *SMTP
|
|
|
func LoginUserPAMSource(u *User, name, passwd string, sourceId int64, cfg *PAMConfig, autoRegister bool) (*User, error) {
|
|
|
if err := pam.PAMAuth(cfg.ServiceName, name, passwd); err != nil {
|
|
|
if strings.Contains(err.Error(), "Authentication failure") {
|
|
|
- return nil, ErrUserNotExist{u.Id, u.Name}
|
|
|
+ return nil, ErrUserNotExist{0, name}
|
|
|
}
|
|
|
return nil, err
|
|
|
}
|