convert $user->data to array