Ejemplo n.º 1
0
 /**
  * Load the setup for a given user
  *
  * @return Array
  */
 function loadUserConf($userId)
 {
     $fullConf = array();
     try {
         $confElement = new confElement($userId);
         $userConf = $confElement->getConfElementsByUserId($userId);
         if ($userConf && $userConf->rowCount() > 0) {
             $elements = $userConf->fetchAll(PDO::FETCH_OBJ);
             foreach ($elements as $element) {
                 $fullConf[$element->name]['label'] = $element->name;
                 $fullConf[$element->name]['value'] = $element->value;
                 $fullConf[$element->name]['type'] = $element->type;
                 $fullConf[$element->name]['description'] = $element->Description;
             }
         }
     } catch (PDOException $e) {
         $this->error[] = $e->getMessage();
     }
     return $fullConf;
 }