diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2015-04-24 15:03:21 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2015-04-24 15:03:21 +0800 |
commit | 673a76d638139ad3d5df1ba4314edfb1df2afc5c (patch) | |
tree | 3677ac48d117e59fa4be4db5cef6dc69c1fcf053 /models/user.go | |
parent | 2c4fb6e6469f756dfaeb276302bac87e4dac3e1e (diff) | |
parent | 5a4f314cf7465425bb2802bf9d2995c258af6697 (diff) | |
download | gitea-673a76d638139ad3d5df1ba4314edfb1df2afc5c.tar.gz gitea-673a76d638139ad3d5df1ba4314edfb1df2afc5c.zip |
Merge pull request #1211 from mephux/hotfix/type-fix-ValidatePassword
Hotfix/type fix validate password
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/user.go b/models/user.go index bf69f97a1b..e239ea174d 100644 --- a/models/user.go +++ b/models/user.go @@ -143,8 +143,8 @@ func (u *User) EncodePasswd() { u.Passwd = fmt.Sprintf("%x", newPasswd) } -// ValidtePassword checks if given password matches the one belongs to the user. -func (u *User) ValidtePassword(passwd string) bool { +// 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() return u.Passwd == newUser.Passwd |