VII. Group Reference

Midgard uses group records to describe groups. Groups contain persons. Group membership is defined by member records.

1. Group Record Definition

A group record contains information about a group and its owner.

Fields of a group record

id

The id of the group record.

name

The name of the group.

official

The official name of the group.

street

The street part of the group address.

city

The city part of the group address.

homepage

The url to the group homepage.

email

The emailaddress of the group.

extra

A freeform information field.

owner

The group id of the owner of the group.

sitegroup

The id of the sitegroup the record belongs to.

2. Group Object Definition

Midgard functions like mgd_get_groupand mgd_list_groups return objects upon success. This section describes the contents of those objects. Most object parameters map directly to the record fields described above.

The functions listed within the object definition are the object methods that are available for the object. Usage information about those methods can be found in Object Methods.

/* Group Object Prototyp */

Class group {

 var $N;          # Only available with mgd_list_XXX functions.
 var $id;
 var $name;
 var $official;
 var $street;
 var $postcode;
 var $city;
 var $homepage;
 var $email;
 var $extra;
 var $owner;
 var $sitegroup;

  function fetch();     # Only available mgd_list_XXX functions.

  function create();
  function update();
  function delete();

  function setsitegroup();
  function getsitegroup();

  function parameter();
  function listparameters();
  function searchparameters();

  function setscore();

  function settype();

  function createattachment();
  function updateattachment();
  function deleteattachment();
  function getattachment();
  function listattachment();
  function openattachment();
  function serveattachment();
}
Table of Contents
mgd_create_group — Create a group
mgd_delete_group — Delete a group
mgd_get_group — Get a group record
mgd_get_group_by_name — Get a group record by its name
mgd_is_group_owner — Check group ownership
mgd_list_groups — List groups
mgd_update_group — Update a group record