public function validateUser(CommandData $commandData) {
    $userid = $commandData->input()->getOption('userid');
    if ($userid) {
      $account = User::load($userid);
      if (!$account) {
        throw new \Exception("User ID does not match an existing user.");
      }
    }
  }
public function validateUser(CommandData $commandData) {
    $userid = $commandData->input()->getOption('userid');
    if ($userid) {
      $account = User::load($userid);
      if (!$account) {
        throw new \Exception("User ID does not match an existing user.");
      }
    }
  }
public function validateUser ( CommandData $ commandData ) { $ userid = $ commandData -> input ( ) -> getOption ( 'userid' ) ; if ( $ userid ) { $ account = User :: load ( $ userid ) ; if ( ! $ account ) { throw new \ Exception ( "User ID does not match an existing user." ) ; } } }
Validate the provided userid.

@hook validate migrate:import
Validate the provided userid .