We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b51ef9d commit 4e783f0Copy full SHA for 4e783f0
1 file changed
loginSystem/views.py
@@ -79,6 +79,11 @@ def verifyLogin(request):
79
80
admin = Administrator.objects.get(userName=username)
81
82
+ if admin.state == 'SUSPENDED':
83
+ data = {'userID': 0, 'loginStatus': 0, 'error_message': 'Account currently suspended.'}
84
+ json_data = json.dumps(data)
85
+ return HttpResponse(json_data)
86
+
87
if hashPassword.check_password(admin.password, password):
88
89
request.session['userID'] = admin.pk
0 commit comments