From c6260f34b931bdda82d3dab256f4420caa1a45aa Mon Sep 17 00:00:00 2001 From: Horus3 Date: Fri, 13 Feb 2015 17:32:07 +0100 Subject: Add Login() and Register(). --- app/controllers/utilities.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/controllers/utilities.go') diff --git a/app/controllers/utilities.go b/app/controllers/utilities.go index 99720b8..2d07bdf 100644 --- a/app/controllers/utilities.go +++ b/app/controllers/utilities.go @@ -87,10 +87,11 @@ func HashPassword(password string) (string, error) { } // Verify password and hash -func VerifyPassword(password, hash string) (bool, error) { +func VerifyPassword(password, hash string) bool { err := bcrypt.CompareHashAndPassword([]byte(hash), []byte(password)) if err != nil { - return false, err + revel.ERROR.Printf("%s \n", err) + return false } - return true, nil + return true } -- cgit v1.2.3