src/wcmf/application/controller/UserController.php
public function getConfigValue() {
    $session = $this->getSession();
    $request = $this->getRequest();
    $response = $this->getResponse();

    // load model
    $value = null;
    $authUser = $this->principalFactory->getUser($session->getAuthUser());
    if ($authUser) {
      $configKey = $request->getValue('name');

      // find configuration
      $configObj = null;
      $configList = Node::filter($authUser->getValue('UserConfig'), null, null,
              ['name' => $configKey]);
      $value = sizeof($configList) > 0 ?
              $configObj = $configList[0]->getValue('value') : null;
    }
    $response->setValue('value', $value);

    // success
    $response->setAction('ok');
  }
public function getConfigValue() {
    $session = $this->getSession();
    $request = $this->getRequest();
    $response = $this->getResponse();

    // load model
    $value = null;
    $authUser = $this->principalFactory->getUser($session->getAuthUser());
    if ($authUser) {
      $configKey = $request->getValue('name');

      // find configuration
      $configObj = null;
      $configList = Node::filter($authUser->getValue('UserConfig'), null, null,
              ['name' => $configKey]);
      $value = sizeof($configList) > 0 ?
              $configObj = $configList[0]->getValue('value') : null;
    }
    $response->setValue('value', $value);

    // success
    $response->setAction('ok');
  }
public function getConfigValue ( ) { $ session = $ this -> getSession ( ) ; $ request = $ this -> getRequest ( ) ; $ response = $ this -> getResponse ( ) ; // load model $ value = null ; $ authUser = $ this -> principalFactory -> getUser ( $ session -> getAuthUser ( ) ) ; if ( $ authUser ) { $ configKey = $ request -> getValue ( 'name' ) ; // find configuration $ configObj = null ; $ configList = Node :: filter ( $ authUser -> getValue ( 'UserConfig' ) , null , null , [ 'name' => $ configKey ] ) ; $ value = sizeof ( $ configList ) > 0 ? $ configObj = $ configList [ 0 ] -> getValue ( 'value' ) : null ; } $ response -> setValue ( 'value' , $ value ) ; // success $ response -> setAction ( 'ok' ) ; }
Get a configuration for the user

| Parameter     | Description
|---------------|----------------------------
| _in_ `name`   | The configuration name
| _out_ `value` | The configuration value
Get a configuration for the user