mgd_update_public

(Midgard 1.4.2 'Bifrost')

mgd_update_public -- Change the access flags to a person's contact information

Description

bool mgd_update_public (int id, bool addressp, bool phonep, bool homepagep, bool emailp, bool extrap)

Minimum version: Midgard 1.0

Changes which parts of the record are accessible for the public. Is a flag set to FALSE, only admin-level users and the person herself are able to view the data. The public flags are stored in the record field info.

Only administrators and the user himself can change these flags.

Returns TRUE on success, FALSE on failure.


<?php
  $addressp = FALSE; 
  $phonep = FALSE; 
  $homepagep = TRUE; 
  $emailp = TRUE;
  $extrap = FALSE;
  mgd_update_public($person->id, 
    $addressp, $phonep, $homepagep, $emailp, $extrap);
?>