Skip to content

Commit

Permalink
Don't need to validate username on profile-update
Browse files Browse the repository at this point in the history
Conflicts:

	src/clojars/web/user.clj
  • Loading branch information
technomancy committed Mar 10, 2012
1 parent 339d282 commit 7df6380
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/clojars/web/user.clj
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@
(conj-when (blank? password) "Password can't be blank") (conj-when (blank? password) "Password can't be blank")
(conj-when (not= password confirm) (conj-when (not= password confirm)
"Password and confirm password must match") "Password and confirm password must match")
(conj-when (or (reserved-names user) ; "I told them we already (conj-when (and (nil? account) ; only check username on register
(and (not= account user) ; got one!" (or (reserved-names user) ; "I told them we already
(find-user user)) (and (not= account user) ; got one!"
(seq (group-members user))) (find-user user))
(seq (group-members user))))
"Username is already taken") "Username is already taken")
(conj-when (not (re-matches #"[a-z0-9_-]+" user)) (conj-when (not (re-matches #"[a-z0-9_-]+" user))
(str "Usernames must consist only of lowercase " (str "Usernames must consist only of lowercase "
Expand Down

0 comments on commit 7df6380

Please sign in to comment.