Assign user_id the first value of the db query, not the whole array.

This fixes the data insertion.