/** * Retrieves the list of nicknames for the current domain and outputs * that list. * * @param Zend_Gdata_Gapps $gapps The service object to use for communicating with the Google * Apps server. * @param boolean $html True if output should be formatted for display in a web browser. * @return void */ function retrieveAllNicknames($gapps, $html) { if ($html) { echo "<h2>Registered Nicknames</h2>\n"; } $feed = $gapps->retrieveAllNicknames(); if ($html) { echo "<ul>\n"; } foreach ($feed as $nickname) { if ($html) { echo " <li>"; } else { echo " * "; } echo $nickname->nickname->name . ' => ' . $nickname->login->username; if ($html) { echo '</li>'; } echo "\n"; } if ($html) { echo "</ul>\n"; } }