update conflict resolution
This commit is contained in:
parent
5396934f66
commit
659ef11451
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ case "$action" in
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
{
|
{
|
||||||
query="SELECT password FROM users WHERE username=$(escape_sql_str "$username")"
|
query="SELECT password FROM users WHERE username=$(escape_sql_str "$username") ON CONFLICT (username) DO SET password=excluded.password"
|
||||||
row=$(db_row "$query")
|
row=$(db_row "$query")
|
||||||
if [[ "$row" == "null" ]]; then
|
if [[ "$row" == "null" ]]; then
|
||||||
hash=$(printf '%s' "$password" | argon2_hash)
|
hash=$(printf '%s' "$password" | argon2_hash)
|
||||||
|
|
Loading…
Reference in a new issue