Skip to content

Commit

Permalink
#209 allow - and _ for usernames
Browse files Browse the repository at this point in the history
  • Loading branch information
tonylampada committed Aug 28, 2014
1 parent 733369e commit 77e44e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion djangoproject/core/services/user_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def deactivate_user(user):


def is_valid_username(username):
return re.search(r'^\w*[a-zA-Z]\w*$', username) is not None
return re.search(r'^[\w\-_]*[a-zA-Z][\w\-_]*$', username) is not None


def is_username_available(username):
Expand Down

0 comments on commit 77e44e5

Please sign in to comment.