Validate foreign key presence, add user_id to posts