Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simplified user login function

  • Loading branch information...
commit 50150e0b503349390b0b0f3aa100d69f07655b6a 1 parent 9488435
David Davis authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 src/shared_resource/models/user.clj
View
8 src/shared_resource/models/user.clj
@@ -35,9 +35,7 @@
([username password] (login? username password false))
([username password save-user]
(if-let [user-entry (auth/find-user username)]
- (if (auth/authenticate? user-entry password)
- (do
- (if save-user (find-or-create-user (auth/user-attributes user-entry)))
- true)
- false)
+ (when (auth/authenticate? user-entry password)
+ (if save-user (find-or-create-user (auth/user-attributes user-entry)))
+ true)
false)))
Please sign in to comment.
Something went wrong with that request. Please try again.