Commit db3c5fa9 authored by Zosman's avatar Zosman
Browse files

spacing stuff

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