Finish log in user

This commit is contained in:
Unknown 2014-03-06 11:42:14 -05:00
parent d8b92b4bc9
commit 56a7ab4da5
8 changed files with 104 additions and 58 deletions

View file

@ -192,7 +192,7 @@ func GetUserById(id int64) (*User, error) {
// LoginUserPlain validates user by raw user name and password.
func LoginUserPlain(name, passwd string) (*User, error) {
user := User{Name: name, Passwd: passwd}
user := User{LowerName: strings.ToLower(name), Passwd: passwd}
if err := user.EncodePasswd(); err != nil {
return nil, err
}