src/wcmf/lib/service/impl/HTTPClient.php
protected function doLogin() {
    if ($this->user) {
      $request = ObjectFactory::getNewInstance('request');
      $request->setAction('login');
      $request->setValues([
        'login' => $this->user['login'],
        'password' => $this->user['password']
      ]);
      $response = $this->doRemoteCall($request, true);
      if ($response->getValue('success')) {
        $this->sessionId = $response->getValue('sid');
        return true;
      }
    }
    else {
      throw new \RuntimeException("Remote user required for remote call.");
    }
  }
protected function doLogin() {
    if ($this->user) {
      $request = ObjectFactory::getNewInstance('request');
      $request->setAction('login');
      $request->setValues([
        'login' => $this->user['login'],
        'password' => $this->user['password']
      ]);
      $response = $this->doRemoteCall($request, true);
      if ($response->getValue('success')) {
        $this->sessionId = $response->getValue('sid');
        return true;
      }
    }
    else {
      throw new \RuntimeException("Remote user required for remote call.");
    }
  }
protected function doLogin ( ) { if ( $ this -> user ) { $ request = ObjectFactory :: getNewInstance ( 'request' ) ; $ request -> setAction ( 'login' ) ; $ request -> setValues ( [ 'login' => $ this -> user [ 'login' ] , 'password' => $ this -> user [ 'password' ] ] ) ; $ response = $ this -> doRemoteCall ( $ request , true ) ; if ( $ response -> getValue ( 'success' ) ) { $ this -> sessionId = $ response -> getValue ( 'sid' ) ; return true ; } } else { throw new \ RuntimeException ( "Remote user required for remote call." ) ; } }
Do the login request. If the request is successful,
the session id will be set.
@return True on success
Do the login request . If the request is successful the session id will be set .