Changed id checking to user_id