/**
  * Up
  **/
 public function up()
 {
     $params = $this->getParams('plg_system_hubzero');
     $search = $params->get('search');
     if ($search && $search == 'ysearch') {
         $params->set('search', 'search');
         $component = new \JTableExtension($this->db);
         $component->load(array('folder' => 'system', 'element' => 'hubzero'));
         $component->set('params', (string) $params);
         $component->store();
     }
 }
 /**
  * Up
  **/
 public function up()
 {
     $params = $this->getParams('com_users');
     $user_type = $params->get('new_usertype');
     if (is_string($user_type) && strlen($user_type) > 2) {
         $query = "SELECT `id` FROM `#__usergroups` WHERE `title` = " . $this->db->quote($user_type);
         $this->db->setQuery($query);
         if ($id = $this->db->loadResult()) {
             $params->set('new_usertype', $id);
             $component = new \JTableExtension($this->db);
             $component->load(array('element' => 'com_users'));
             $component->set('params', (string) $params);
             $component->store();
         } else {
             $this->setError('Failed to convert new user type paramter of "' . $user_type . '" to an ID.', 'warning');
             return false;
         }
     }
 }