Update user.go
This commit is contained in:
parent
dffd67a9fe
commit
3cd5463b4c
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"gitlab.com/trantor/trantor/lib/database"
|
||||
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func loginHandler(h handler) {
|
||||
|
@ -20,7 +21,7 @@ func loginHandler(h handler) {
|
|||
}
|
||||
|
||||
func loginPostHandler(h handler) {
|
||||
user := h.r.FormValue("user")
|
||||
user := strings.TrimSpace(h.r.FormValue("user"))
|
||||
pass := h.r.FormValue("pass")
|
||||
if h.db.ValidPassword(user, pass) {
|
||||
log.Info("User ", user, " log in")
|
||||
|
|
Reference in a new issue