def get_student_from_identifier(unique_student_identifier):
 unique_student_identifier = strip_if_string(unique_student_identifier)
 if ('@' in unique_student_identifier):
  student = User.objects.get(email=unique_student_identifier)
 else:
  student = User.objects.get(username=unique_student_identifier)
 return student

def get_student_from_identifier ( unique_student_identifier ) : unique_student_identifier = strip_if_string ( unique_student_identifier ) if ( '@' in unique_student_identifier ) : student = User . objects . get ( email = unique_student_identifier ) else : student = User . objects . get ( username = unique_student_identifier ) return student
gets a student object using either an email address or username .