src/wcmf/lib/service/RemotingServer.php
private function getRemoteUser($serverKey) {
    if (!isset($this->users[$serverKey])) {
      $config = ObjectFactory::getInstance('configuration');
      $remoteUser = $config->getValue($serverKey, 'remoteuser');
      if (is_array($remoteUser) && sizeof($remoteUser) == 2) {
        $this->users[$serverKey] = [
          'login' => $remoteUser[0],
          'password' => $remoteUser[1]
        ];
      }
      else {
        throw new IllegialConfigurationException(
                "Remote user definition of '".$serverKey.
                "' must be an array of login and password."
        );
      }
    }
    return $this->users[$serverKey];
  }
private function getRemoteUser($serverKey) {
    if (!isset($this->users[$serverKey])) {
      $config = ObjectFactory::getInstance('configuration');
      $remoteUser = $config->getValue($serverKey, 'remoteuser');
      if (is_array($remoteUser) && sizeof($remoteUser) == 2) {
        $this->users[$serverKey] = [
          'login' => $remoteUser[0],
          'password' => $remoteUser[1]
        ];
      }
      else {
        throw new IllegialConfigurationException(
                "Remote user definition of '".$serverKey.
                "' must be an array of login and password."
        );
      }
    }
    return $this->users[$serverKey];
  }
private function getRemoteUser ( $ serverKey ) { if ( ! isset ( $ this -> users [ $ serverKey ] ) ) { $ config = ObjectFactory :: getInstance ( 'configuration' ) ; $ remoteUser = $ config -> getValue ( $ serverKey , 'remoteuser' ) ; if ( is_array ( $ remoteUser ) && sizeof ( $ remoteUser ) == 2 ) { $ this -> users [ $ serverKey ] = [ 'login' => $ remoteUser [ 0 ] , 'password' => $ remoteUser [ 1 ] ] ; } else { throw new IllegialConfigurationException ( "Remote user definition of '" . $ serverKey . "' must be an array of login and password." ) ; } } return $ this -> users [ $ serverKey ] ; }
Get the remote user login and password for a given server key
@param $serverKey An entry in the configuration section 'remoteuser'
@return Array with keys 'login', 'password'
Get the remote user login and password for a given server key