Archived
Fix pw reset of non-registered memberships
This commit is contained in:
1 parent
6f5a2f091d
commit
135e7493f8
1 file changed
+8
@@ -60,6 +60,14 @@ class NeufSetPasswordForm(SetPasswordForm):
|
||||
|
||||
return raw_password
|
||||
|
||||
def clean(self):
|
||||
if self.user.username is None:
|
||||
url = '<a href="https://inside.studentersamfundet.no/sms/register.php">her</a>'
|
||||
raise ValidationError(
|
||||
'Du må fullføre registrering av medlemskapet ditt før du kan bytte passord. Det gjør du {url}.'.format(url=url))
|
||||
|
||||
return super(NeufSetPasswordForm, self).clean()
|
||||
|
||||
|
||||
class NeufPasswordChangeForm(NeufSetPasswordForm):
|
||||
pass
|
||||
|
||||
Reference in new issue
Block a user