Ensure update timestamp is updated when changing passwords; this ensures the sync will automatically follow

This commit is contained in:
Jason Ertel
2021-12-21 13:38:35 -05:00
parent 62e5914ab8
commit b0d36f2ed2

View File

@@ -147,7 +147,7 @@ function updatePassword() {
# Generate password hash
passwordHash=$(hashPassword "$password")
# Update DB with new hash
echo "update identity_credentials set config=CAST('{\"hashed_password\":\"$passwordHash\"}' as BLOB) where identity_id='${identityId}';" | sqlite3 "$databasePath"
echo "update identity_credentials set config=CAST('{\"hashed_password\":\"$passwordHash\"}' as BLOB), updated_at=datetime('now') where identity_id='${identityId}';" | sqlite3 "$databasePath"
[[ $? != 0 ]] && fail "Unable to update password"
fi
}