/** * Loops over the configuration to detect the capabilities of this * Members setup. Populates two array's, one for Field objects, and * one for Field handles. */ public static function initialise() { extension_Members::$initialised = true; $sectionManager = extension_Members::$entryManager->sectionManager; $membersSectionSchema = array(); if (!is_null(extension_Members::getMembersSection()) && is_numeric(extension_Members::getMembersSection())) { $memberSection = $sectionManager->fetch(extension_Members::getMembersSection()); if ($memberSection instanceof Section) { $membersSectionSchema = $memberSection->fetchFieldsSchema(); } else { Symphony::$Log->pushToLog(__("The Member's section, %d, saved in the configuration could not be found.", array(extension_Members::getMembersSection())), E_ERROR, true); } } foreach ($membersSectionSchema as $field) { if ($field['type'] == 'membertimezone') { extension_Members::initialiseField($field, 'timezone'); continue; } if ($field['type'] == 'memberrole') { extension_Members::initialiseField($field, 'role'); continue; } if ($field['type'] == 'memberactivation') { extension_Members::initialiseField($field, 'activation'); continue; } if ($field['type'] == 'memberusername') { extension_Members::initialiseField($field, 'identity'); continue; } if ($field['type'] == 'memberemail') { extension_Members::initialiseField($field, 'email'); continue; } if ($field['type'] == 'memberpassword') { extension_Members::initialiseField($field, 'authentication'); continue; } } }