summaryrefslogtreecommitdiff
path: root/app/controllers/utilities.go
diff options
context:
space:
mode:
authorHorus32015-02-13 17:32:07 +0100
committerHorus32015-02-13 17:32:07 +0100
commitc6260f34b931bdda82d3dab256f4420caa1a45aa (patch)
treeb92bc5e06670653d58321a21fe764a1f03caaf98 /app/controllers/utilities.go
parentd6ab45e8ec5f26004b4efc07383245051d546bf3 (diff)
downloadstatuspage-c6260f34b931bdda82d3dab256f4420caa1a45aa.tar.gz
Add Login() and Register().
Diffstat (limited to 'app/controllers/utilities.go')
-rw-r--r--app/controllers/utilities.go7
1 files changed, 4 insertions, 3 deletions
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
}