Skip to content

Commit

Permalink
update slt selection
Browse files Browse the repository at this point in the history
allow for accounts to get deleted/recreated without causing issues during subsequent account login
  • Loading branch information
Bikingman committed Apr 9, 2022
1 parent a5f1072 commit 4ea0c99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion safer_streets_priority_finder/R/fct_login_funcs.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ get_user_id <- function(connection, username, password){
password <- DBI::dbQuoteString(connection, password)

# get salt
salt <- as.character(DBI::dbGetQuery(connection, glue::glue("SELECT salt FROM gen_management.salt WHERE pgp_sym_decrypt(decode(username, 'hex'), {key}) = {username};"))[1,1])
salt <- as.character(DBI::dbGetQuery(connection, glue::glue("SELECT salt FROM gen_management.salt WHERE pgp_sym_decrypt(decode(username, 'hex'), {key}) = {username} ORDER BY time_created DESC LIMIT 1;"))[1,1])
sterilized_salt <- DBI::dbQuoteString(connection, salt)

q <- glue::glue("SELECT DISTINCT user_id
Expand Down

0 comments on commit 4ea0c99

Please sign in to comment.