The pilot can only log solo flight time if they are the only person on board the aircraft. Even if there aren't any other pilots aboard, and you're only carrying passengers who have no idea how to operate an aircraft, you still can't log your flight as a solo.