IX. Member Reference

Midgard uses member records to store group memberships for persons.

1. Member Record Definition

A member record contains information about a member, the person it belongs to, and the group it links to.

Fields of a member record

id

The id of the member record.

uid

The id of the person this record relates to.

gid

The id of the group this record links to.

extra

A freeform information field.

sitegroup

The id of the sitegroup the member record belongs to.

2. Member Object Definition

This section describes the contents of member 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.

/* Member Object Prototype */

Class member {

  var $N;       # only with mgd_list_XXX functions.
  var $id;
  var $uid;
  var $gid;
  var $extra;
  var $info;
  var $sitegroup;

  function fetch();  # only with 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_member — Create a member record
mgd_delete_member — Delete a member record
mgd_get_member — Get a member record
mgd_is_member — Check group membership
mgd_list_members — List members
mgd_list_memberships — List group memberships
mgd_update_member — Update a member record