@receiver(check_student_info)<EOL>def checkBanlist(sender, **kwargs):
if not getConstant('<STR_LIT>'):<EOL><INDENT>return<EOL><DEDENT>logger.debug('<STR_LIT>')<EOL>formData = kwargs.get('<STR_LIT>', {})<EOL>first = formData.get('<STR_LIT>')<EOL>last = formData.get('<STR_LIT>')<EOL>email = formData.get('<STR_LIT:email>')<EOL>request = kwargs.get('<STR_LIT>', {})<EOL>session = getattr(request, '<STR_LIT>', {}).get(REG_VALIDATION_STR, {})<EOL>registrationId = getattr(kwargs.get('<STR_LIT>', None), '<STR_LIT:id>', None)<EOL>records = BannedPerson.objects.exclude(<EOL>disabled=True<EOL>).exclude(<EOL>expirationDate__lte=timezone.now()<EOL>).filter(<EOL>(Q(firstName__iexact=first) & Q(lastName__iexact=last)) |<EOL>Q(bannedemail__email__iexact=email)<EOL>)<EOL>if not records.exists():<EOL><INDENT>return<EOL><DEDENT>flagCode = '<STR_LIT>'.join(random.choice(string.ascii_uppercase) for x in range(<NUM_LIT:8>))<EOL>ip = get_client_ip(request)<EOL>respondTo = getConstant('<STR_LIT>') or getConstant('<STR_LIT>')<EOL>for record in records:<EOL><INDENT>flagRecord = BanFlaggedRecord.objects.create(<EOL>flagCode=flagCode,<EOL>person=record,<EOL>ipAddress=ip,<EOL>data={'<STR_LIT>': session, '<STR_LIT>': formData, '<STR_LIT>': registrationId}<EOL>)<EOL><DEDENT>notify = getConstant('<STR_LIT>')<EOL>if notify:<EOL><INDENT>send_from = getConstant('<STR_LIT>')<EOL>subject = _('<STR_LIT>')<EOL>message = _(<EOL>'<STR_LIT>' +<EOL>'<STR_LIT>' +<EOL>'<STR_LIT>' % record.fullName +<EOL>'<STR_LIT>' % email +<EOL>'<STR_LIT>' % flagRecord.dateTime +<EOL>'<STR_LIT>' % ip +<EOL>'<STR_LIT>' +<EOL>'<STR_LIT>' % (respondTo, flagCode)<EOL>)<EOL>sendEmail(subject, message, send_from, to=[notify])<EOL><DEDENT>message = ugettext('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' % (respondTo, flagCode))<EOL>if request.user.has_perm('<STR_LIT>'):<EOL><INDENT>messages.warning(request, message)<EOL><DEDENT>else:<EOL><INDENT>raise ValidationError(message)<EOL><DEDENT>
Check that this individual is not on the ban list.