Commit db3c5fa9 authored by Zosman's avatar Zosman

spacing stuff

parent 7f25afe1
Pipeline #672 passed with stage
in 1 minute and 27 seconds
......@@ -337,13 +337,13 @@ def useradmin(request):
settings.EMAIL_FROM,
[user_mail]
)
# If we're denying users
elif '_deny' in request.POST:
for name in userlist:
toDeny = RegisteredUser.objects.get(user__username__exact=name)
if settings.EMAIL_HOST and settings.EMAIL_PORT:
user_mail = toDeny.user.username + settings.EMAIL_DOMAIN
# Send an email letting them know they are denied
send_mail(
'Your Account has been Denied!',
......@@ -362,6 +362,7 @@ def useradmin(request):
# Delete their associated RegisteredUsers
toDeny.user.delete()
return HttpResponseRedirect('useradmin')
# If we're blocking users
elif '_block' in request.POST:
for name in userlist:
......@@ -385,6 +386,7 @@ def useradmin(request):
# toBlock.user.delete()
toBlock.blocked = True
toBlock.save()
# If we're un-blocking users
elif '_unblock' in request.POST:
for name in userlist:
......@@ -431,9 +433,9 @@ def useradmin(request):
)
toRemove.user.delete()
return HttpResponseRedirect('useradmin')
# Get a list of all RegisteredUsers that need to be approved
need_approval = RegisteredUser.objects.filter(registered=True).filter(approved=False)
current_users = RegisteredUser.objects.filter(approved=True).filter(registered=True).filter(blocked=False)
blocked_users = RegisteredUser.objects.filter(blocked=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment