/**
  * Load the properties of a certain permission
  *
  * @param integer $id ID of the user in the database
  */
 public function load($name, $profile_id = 0, $user_id = 0, $website = null)
 {
     global $DB;
     $ws_query = '';
     if (!empty($website)) {
         $ws_query = ' AND website = ' . protect($website);
     }
     $status = $DB->query('
         SELECT * FROM nv_permissions
          WHERE name = ' . protect($name) . '
            AND profile = ' . intval($profile_id) . '
            AND user = '******'name'];
         $this->website = $website;
         $this->scope = $definition['scope'];
         $this->function = $definition['function'];
         $this->type = $definition['type'];
         $this->profile = intval($profile_id);
         $this->user = intval($user_id);
         $this->value = json_decode($definition['dvalue'], true);
     }
 }