function __construct(&$config, $dn = NULL, $object = NULL)
 {
     #definition des variables
     $attributesInfo = self::getAttributesInfo();
     /* Languages */
     $languages = get_languages(TRUE);
     asort($languages);
     $languages = array_merge(array("" => _("Automatic")), $languages);
     $attributesInfo['look_n_feel']['attrs'][0]->setChoices(array_keys($languages), array_values($languages));
     /* Timezones */
     $attributesInfo['look_n_feel']['attrs'][2]->setChoices(timezone::_get_tz_zones());
     /* Password methods */
     $methods = passwordMethod::get_available_methods();
     $methods = $methods['name'];
     $attributesInfo['password']['attrs'][0]->setChoices($methods);
     parent::__construct($config, $dn, $object, $attributesInfo);
     $this->fusionConfigMd5 = md5_file(CACHE_DIR . "/" . CLASS_CACHE);
     $this->attributesAccess['fdEnableSnapshots']->setManagedAttributes(array('disable' => array(FALSE => array('fdSnapshotBase'))));
     $this->attributesAccess['fdForceSSL']->setManagedAttributes(array('disable' => array(TRUE => array('fdWarnSSL'))));
     $this->attributesAccess['fdIdAllocationMethod']->setManagedAttributes(array('erase' => array('traditional' => array('fdUidNumberPoolMin', 'fdUidNumberPoolMax', 'fdGidNumberPoolMin', 'fdGidNumberPoolMax'))));
 }
Exemple #2
0
    if (empty($_SERVER['REQUEST_URI'])) {
        $ssl = "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['PATH_INFO'];
    } else {
        $ssl = "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    }
}
/* If SSL is forced, just forward to the SSL enabled site */
if ($config->get_cfg_value("core", "forceSSL") == 'true' && $ssl != '') {
    header("Location: {$ssl}");
    exit;
}
/* Check for selected password method */
$method = $config->get_cfg_value("core", "passwordDefaultHash");
if (isset($_GET['method'])) {
    $method = validate($_GET['method']);
    $tmp = new passwordMethod($config, "dummy");
    $available = $tmp->get_available_methods();
    if (!isset($available[$method])) {
        msg_dialog::display(_("Password method"), _("Error: Password method not available!"), FATAL_ERROR_DIALOG);
        exit;
    }
}
/* Check for selected user... */
if (isset($_GET['uid']) && $_GET['uid'] != "") {
    $uid = validate($_GET['uid']);
    $smarty->assign('display_username', false);
} elseif (isset($_POST['uid'])) {
    $uid = get_post('uid');
    $smarty->assign('display_username', true);
} else {
    $uid = "";