Users

List view
Voter Registration and Quality Control
Organizing
Petitions and Quality Control
Admin
Phone Banking
 

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
Joins
id
primary key (int)
unique user id
email
text
user email
unique to table
encrypted_password
text
password encryption
unique to table
reset_password_token
text
token to reset password last sent to user
unique to table
reset_password_sent_at
timestamp
date&time of most recent reset password email
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
joins: 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
avatar_data
text
file data of uploaded avatar to user account
unique to 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
locale
text
local language of user session
unique to table
slug
text
url slug of user account
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
direct_otp
integer
2fa code sent to user most recently (expires)
unique to table
direct_otp_sent_at
timestamp
date&time 2fa code was last sent to user
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 (Phone Banking specific)
spoken_language_locales
jsonb
languages spoken by the user (used for quality control)
unique to table (Quality Control Specific)
trained_in_states
jsonb
states the user has been trained in for quality control
unique to table (Quality Control Specific)
training_status
text
level of training for quality control
unique to table (Quality Control Specific)
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
unique to table (Quality Control Specific)
notifications
jsonb
notifications the user receives (turf changes and quality control flags)
unique to table
programs
jsonb
list of programs that user has access to
joins: programs in turfs table