References updated

changed references of $user->ids and$user->market_id.