Merge remote-tracking branch 'origin/master'

This commit is contained in:
Bob 2020-10-26 08:59:53 +08:00
commit 85a0664972
2 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,8 @@ def polls_login(request):
profile = user.userprofile_set.first() profile = user.userprofile_set.first()
if not profile or profile.status == 0: if not profile or profile.status == 0:
return JsonResponse({'status': 'error', 'message': '用户尚未激话'}) return JsonResponse({'status': 'error', 'message': '用户尚未激话'})
if not profile or profile.admin_status == 0:
return JsonResponse({'status': 'error', 'message': '用户已删除,请联系管理员'})
u = authenticate(request, username=phone, password=password) u = authenticate(request, username=phone, password=password)
if u is not None: if u is not None: