aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorDustin Willis Webber <dustin.webber@gmail.com>2015-04-16 14:36:32 -0400
committerDustin Willis Webber <dustin.webber@gmail.com>2015-04-16 14:36:32 -0400
commitf78046fc3be8db80f8ac44512237c92825540e5d (patch)
treef4951d1093d43f456c294a58c0aa2d8f212a6b42 /models
parent639e34e362c3e4cea2532de4b811dc8bb916f9f3 (diff)
downloadgitea-f78046fc3be8db80f8ac44512237c92825540e5d.tar.gz
gitea-f78046fc3be8db80f8ac44512237c92825540e5d.zip
typo fix
Diffstat (limited to 'models')
-rw-r--r--models/login.go2
-rw-r--r--models/user.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/models/login.go b/models/login.go
index 916e27310c..73d112568b 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 dcfd0dc5ec..8651464e7b 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