diff options
author | Thomas Boerger <thomas@webhippie.de> | 2016-11-25 12:54:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-25 12:54:57 +0100 |
commit | e9c6053b860d5d4111768d258a2d5d5d665597b0 (patch) | |
tree | 43db1673b2df3848587f9f6e6a157e6f8f844fa3 /models/login_source.go | |
parent | 177a4c73856aa9b8cbebd3989cfbe5c6fe3874b9 (diff) | |
parent | 2a449bd4b12545b904cfdd591fcf17afebf6a3c6 (diff) | |
download | gitea-e9c6053b860d5d4111768d258a2d5d5d665597b0.tar.gz gitea-e9c6053b860d5d4111768d258a2d5d5d665597b0.zip |
Merge pull request #246 from Bwko/fix/typo
Fix typos
Diffstat (limited to 'models/login_source.go')
-rw-r--r-- | models/login_source.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/models/login_source.go b/models/login_source.go index 2d4076fc01..b570f415c7 100644 --- a/models/login_source.go +++ b/models/login_source.go @@ -328,8 +328,8 @@ func composeFullName(firstname, surname, username string) string { // LoginViaLDAP queries if login/password is valid against the LDAP directory pool, // and create a local user if success when enabled. -func LoginViaLDAP(user *User, login, passowrd string, source *LoginSource, autoRegister bool) (*User, error) { - username, fn, sn, mail, isAdmin, succeed := source.Cfg.(*LDAPConfig).SearchEntry(login, passowrd, source.Type == LoginDLDAP) +func LoginViaLDAP(user *User, login, password string, source *LoginSource, autoRegister bool) (*User, error) { + username, fn, sn, mail, isAdmin, succeed := source.Cfg.(*LDAPConfig).SearchEntry(login, password, source.Type == LoginDLDAP) if !succeed { // User not in LDAP, do nothing return nil, ErrUserNotExist{0, login, 0} @@ -545,7 +545,7 @@ func ExternalUserLogin(user *User, login, password string, source *LoginSource, } // UserSignIn validates user name and password. -func UserSignIn(username, passowrd string) (*User, error) { +func UserSignIn(username, password string) (*User, error) { var user *User if strings.Contains(username, "@") { user = &User{Email: strings.ToLower(username)} @@ -561,7 +561,7 @@ func UserSignIn(username, passowrd string) (*User, error) { if hasUser { switch user.LoginType { case LoginNoType, LoginPlain: - if user.ValidatePassword(passowrd) { + if user.ValidatePassword(password) { return user, nil } @@ -576,7 +576,7 @@ func UserSignIn(username, passowrd string) (*User, error) { return nil, ErrLoginSourceNotExist{user.LoginSource} } - return ExternalUserLogin(user, user.LoginName, passowrd, &source, false) + return ExternalUserLogin(user, user.LoginName, password, &source, false) } } @@ -586,7 +586,7 @@ func UserSignIn(username, passowrd string) (*User, error) { } for _, source := range sources { - authUser, err := ExternalUserLogin(nil, username, passowrd, source, true) + authUser, err := ExternalUserLogin(nil, username, password, source, true) if err == nil { return authUser, nil } |