Permalink
Browse files

Don't need to validate username on profile-update

Conflicts:

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

0 comments on commit 7df6380

Please sign in to comment.