From d600530c201339818ccf329ddce21bfeff82f798 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 14 Sep 2015 11:03:42 -0400 Subject: [PATCH] #1635 PAM return error bug --- gogs.go | 2 +- models/login.go | 2 +- templates/.VERSION | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gogs.go b/gogs.go index dfaee96413..7d48abd27b 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.6.12.0913 Beta" +const APP_VER = "0.6.12.0914 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/models/login.go b/models/login.go index 3920fbf107..1b7ecdf417 100644 --- a/models/login.go +++ b/models/login.go @@ -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 } diff --git a/templates/.VERSION b/templates/.VERSION index b269da9b60..2bbb6d7403 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.6.12.0913 Beta \ No newline at end of file +0.6.12.0914 Beta \ No newline at end of file