mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Implement MIT signups.
Here we introduce a new manage.py command, activate_mit, which takes a number of usernames and sends out emails to the users with instructions on how to activate their accounts. (imported from commit f14401b55f915698e83ff27b86434f53e64685f3)
This commit is contained in:
@@ -10,6 +10,13 @@ def is_unique(value):
|
||||
except User.DoesNotExist:
|
||||
pass
|
||||
|
||||
def is_active(value):
|
||||
try:
|
||||
if User.objects.get(email=value).is_active:
|
||||
raise ValidationError(u'%s is already active' % value)
|
||||
except User.DoesNotExist:
|
||||
pass
|
||||
|
||||
class UniqueEmailField(forms.EmailField):
|
||||
default_validators = [validators.validate_email, is_unique]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user