Permalink
Browse files

Fix resend activation link to work with UserProxy. Closes #713.

  • Loading branch information...
1 parent c2bac47 commit 6233536d6ccc1775c614a88172dcc9a66e691250 @onyxfish onyxfish committed May 29, 2012
View
@@ -45,8 +45,8 @@ def clean_username(self):
username = self.cleaned_data["username"]
try:
- User.objects.get(username=username)
- except User.DoesNotExist:
+ UserProxy.objects.get(username=username)
+ except UserProxy.DoesNotExist:
return username
raise forms.ValidationError(_("A user with that email address already exists."))
@@ -147,10 +147,10 @@ def resend_activation_single(self, request, pk):
self.message_user(request, 'Email is not configured for your PANDA.')
return HttpResponseRedirect(
- reverse('admin:auth_user_change', args=[pk])
+ reverse('admin:panda_userproxy_change', args=[pk])
)
- user = get_object_or_404(User, pk=pk)
+ user = get_object_or_404(UserProxy, pk=pk)
user_profile = user.get_profile()
user_profile.generate_activation_key()
@@ -160,14 +160,14 @@ def resend_activation_single(self, request, pk):
self.message_user(request, 'Activation email sent.')
return HttpResponseRedirect(
- reverse('admin:auth_user_change', args=[pk])
+ reverse('admin:panda_userproxy_change', args=[pk])
)
def resend_activation(self, request, queryset):
if not config_value('EMAIL', 'EMAIL_ENABLED'):
self.message_user(request, 'Email is not configured for your PANDA.')
return HttpResponseRedirect(
- reverse('admin:auth_user_changelist')
+ reverse('admin:panda_userproxy_changelist')
)
users = list(queryset)

0 comments on commit 6233536

Please sign in to comment.