Users

Users


 
This is the users table. It contains information on each user account created in Blocks. Information includes user name, email, sign in information and whether or not the user has been disabled.
 

Field
Type
Description
Notes
id
primary key (int)
unique user id
joins: created_by_user_id in shifts table, deliveries table, voter_registration_scan_batches table, canvassers table, locations table, registration_forms, phone_verification_responses, phone_banking_phone_banks, phone_banking_questions, phone_banking_scripts table; reviewed_by_user_id in voter_registration_scans table; user_id in scheduled_exports table, twilio_calls table; assignee_id in shifts table; author_id in quality_control_comments table; called_by_user_id in phone_banking_calls table; user_id in phone_banking_sessions and lists table; assigned_to_user_id in people table
email
text
user email
unique to table
sign_in_count
integer
number of unique logins
unique to table
current_sign_in_at
timestamp
date&time of current session start
unique to table
last_sign_in_at
timestamp
date&time of last session start
unique to table
current_sign_in_ip
integer
IP address of current session
unique to table
last_sign_in_ip
integer
IP address of last session
unique to table
created_at
timestamp
date&time the user was added to blocks
unique to table
updated_at
timestamp
date&time the user profile was last updated
unique to table
role_id
foreign key (int)
unique id of the role the user has been assigned
matches: id in roles table
first_name
text
first name of the user
unique to table
last_name
text
last name of the user
unique to table
turf_id
foreign key (int)
unique id of the turf the user has been assigned
joins: id in turf table, turf_id in locations table and canvassers table
time_zone
text
time zone of the user
unique to table
disabled_at
timestamp
date&time the user was disabled. this will be NULL if the user is currently enabled
unique to table
second_factor_attempts_count
integer
count of incorrect 2FA attempts. Max is 3, at which point it needs to be manually reset to allow login again.
unique to table
two_factor_enabled
text
true/false field
unique to table
two_factor_phone
integer
user phone number used to 2FA
unique to table
phone_bank_sessions_count
integer
count of the number of phone bank sessions the user has begun
unique to table
spoken_language_locales
jsonb
languages spoken by the user (used for quality control)
trained_in_states
jsonb
states the user has been trained in for quality control
training_status
text
level of training for quality control
last_notified_at
timestamp
date&time user last received notifications
unique to table
locked
text
true/false field
unique to table
qc_office
text
qc office the user works out of
notifications
jsonb
notifications the user receives (turf changes and quality control flags)