Commit fe3ffaf2 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

added conditional to addition of welcome messages on log in: do not welcome blocked students

parent 92cf7743
Pipeline #1397 passed with stage
in 3 minutes and 23 seconds
......@@ -34,6 +34,8 @@ def custom_cas_login(request, *args, **kwargs):
elif not request.user.completedSocial:
return HttpResponseRedirect(reverse('welcomeSocial'))
# do not 'welcome back' blocked users
if not request.user.student.blocked:
welcome_back = random.choice(return_messages)
messages.add_message(request, messages.INFO, mark_safe(welcome_back))
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