Example #1
0
 function save()
 {
     $path = '/users/' . self::escape_login($this->login);
     $config = new Config();
     $success = $config->set_string($path . '/first_name', $this->first_name);
     $success &= $config->set_string($path . '/last_name', $this->last_name);
     $success &= $config->set_array($path . '/roles', $this->roles);
     if (isset($this->password_hash)) {
         $success &= $config->set_string($path . '/password_hash', $this->password_hash);
     }
     return $success;
 }