diff --git a/apiserver/apiserver/api/serializers.py b/apiserver/apiserver/api/serializers.py index 50f9b95..652f436 100644 --- a/apiserver/apiserver/api/serializers.py +++ b/apiserver/apiserver/api/serializers.py @@ -639,12 +639,8 @@ class MyPasswordChangeSerializer(PasswordChangeSerializer): class MyPasswordResetSerializer(PasswordResetSerializer): def validate_email(self, email): if not User.objects.filter(email__iexact=email).exists(): - if models.Member.objects.filter(old_email__iexact=email).exists(): - logging.info('Email hasn\'t migrated to Spaceport yet: ' + email) - raise ValidationError('Not on Spaceport.') - else: - logging.info('Email not found: ' + email) - raise ValidationError('Not found.') + logging.info('Email not found: ' + email) + raise ValidationError('Not found.') return super().validate_email(email) def save(self): @@ -701,7 +697,8 @@ class MyPasswordResetConfirmSerializer(PasswordResetConfirmSerializer): member = self.user.member logging.info('Password reset completed for: {} {} ({})'.format(member.first_name, member.last_name, member.id)) - if request_id: utils_stats.set_progress(request_id, 'Changing Spaceport password...') + if request_id: utils_stats.set_progress(request_id, 'Success! You can now log in as: ' + self.user.username) + time.sleep(1) super().save() diff --git a/webclient/src/PasswordReset.js b/webclient/src/PasswordReset.js index 1b8ffd3..0b35e47 100644 --- a/webclient/src/PasswordReset.js +++ b/webclient/src/PasswordReset.js @@ -53,21 +53,6 @@ function ResetForm() { /> } - {error.email == 'Not on Spaceport.' && - - Please sign up to the new portal here:
- - Spaceport Registration - - - } - /> - } - Submit @@ -92,6 +77,7 @@ function ConfirmForm() { const handleSubmit = (e) => { if (loading) return; setLoading(true); + setProgress([]); const request_id = token.slice(-10); const getStatus = () => { @@ -111,8 +97,6 @@ function ConfirmForm() { setLoading(false); setSuccess(true); setError({}); - history.push('/'); - window.scrollTo(0, 0); }) .catch(err => { clearInterval(interval); @@ -151,7 +135,6 @@ function ConfirmForm() { Submit - {success &&
Success!
} ); };