From f78046fc3be8db80f8ac44512237c92825540e5d Mon Sep 17 00:00:00 2001 From: Dustin Willis Webber Date: Thu, 16 Apr 2015 14:36:32 -0400 Subject: typo fix --- models/login.go | 2 +- models/user.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'models') diff --git a/models/login.go b/models/login.go index 916e2731..73d11256 100644 --- a/models/login.go +++ b/models/login.go @@ -169,7 +169,7 @@ func UserSignIn(uname, passwd string) (*User, error) { // For plain login, user must exist to reach this line. // Now verify password. if u.LoginType == PLAIN { - if !u.ValidtePassword(passwd) { + if !u.ValidatePassword(passwd) { return nil, ErrUserNotExist } return u, nil diff --git a/models/user.go b/models/user.go index dcfd0dc5..8651464e 100644 --- a/models/user.go +++ b/models/user.go @@ -146,7 +146,7 @@ func (u *User) EncodePasswd() { } // ValidtePassword checks if given password matches the one belongs to the user. -func (u *User) ValidtePassword(passwd string) bool { +func (u *User) ValidatePassword(passwd string) bool { newUser := &User{Passwd: passwd, Salt: u.Salt} newUser.EncodePasswd() return u.Passwd == newUser.Passwd -- cgit v1.2.3 From e57594dc31fc42c1bb7ba0df77d1d4f249f8f079 Mon Sep 17 00:00:00 2001 From: Dustin Willis Webber Date: Thu, 16 Apr 2015 14:40:39 -0400 Subject: typo fix for comment --- models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models') diff --git a/models/user.go b/models/user.go index 8651464e..e0ba4be3 100644 --- a/models/user.go +++ b/models/user.go @@ -145,7 +145,7 @@ func (u *User) EncodePasswd() { u.Passwd = fmt.Sprintf("%x", newPasswd) } -// ValidtePassword checks if given password matches the one belongs to the user. +// ValidatePassword checks if given password matches the one belongs to the user. func (u *User) ValidatePassword(passwd string) bool { newUser := &User{Passwd: passwd, Salt: u.Salt} newUser.EncodePasswd() -- cgit v1.2.3