Open Source Content Management Framework

mgd_list_preferences

  1. Description

mgd_list_preferences -- List preferences

Description

`object **mgd_list_preferences** (int user, string domain)`

Minimum version: Midgard 1.4 (Bifrost)

Lists the preferences in domain domain for user user. If the domain _parameter is omitted, all preferences for the user will be listed. If the _user parameter is omitted, the preferences for the currently authenticated user will be listed. Preferences are only available when logged in as the user who they're assigned to or as admin.

Returns an object traversable by calling fetch() if successful. Returns FALSE on failure.

<?php
     $user = 17;
     $prefs = mgd_list_preferences( $user );
     if(! $prefs ) {
       echo "Can't list preferences.
"; echo "reason: " . mgd_errstr(); } else { while( $prefs->fetch() ) { echo $prefs->domain . "/" . $prefs->name . " : " . $prefs->value . "
\n"; } } ?>
Designed by Nemein, hosted by Anykey