Skip to content
Snippets Groups Projects
Commit b0d84e21 authored by Chris Lattman's avatar Chris Lattman
Browse files

Ignore inactive users

parent 9a384802
1 merge request!9Make pipeline robust
...@@ -24,7 +24,7 @@ while True: ...@@ -24,7 +24,7 @@ while True:
start_time = time() start_time = time()
# Get emails, student IDs, and usernames of students (excludes default users and instructors) # Get emails, student IDs, and usernames of students (excludes default users and instructors)
query = ("SELECT id, username, email FROM auth_user WHERE last_login IS NOT NULL AND is_superuser = 0 AND is_staff = 0") query = ("SELECT id, username, email FROM auth_user WHERE last_login IS NOT NULL AND is_superuser = 0 AND is_staff = 0 AND is_active = 1")
mysql_cursor.execute(query) mysql_cursor.execute(query)
student_dict = {} student_dict = {}
for (id, username, email) in mysql_cursor: for (id, username, email) in mysql_cursor:
......
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