From: hickert Date: Tue, 30 Oct 2007 11:21:36 +0000 (+0000) Subject: Added login attribute selection to setup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=637d68d2668c4d978769056598926fd67f261715;p=gosa.git Added login attribute selection to setup git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7686 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/contrib/gosa.conf b/contrib/gosa.conf index 701f8c4e2..f4cdc3b87 100644 --- a/contrib/gosa.conf +++ b/contrib/gosa.conf @@ -460,6 +460,11 @@ groups="{$cv.groupou}" gidbase="{$cv.uidbase}" uidbase="{$cv.uidbase}" +{if $cv.optional.login_attribute} + login_attribute="{$cv.optional.login_attribute}" +{else} + login_attribute="uid" +{/if} {if $cv.timezone} timezone="{$cv.timezone}" {/if} diff --git a/setup/class_setupStep_Config3.inc b/setup/class_setupStep_Config3.inc index 8033768c1..f0f30057c 100644 --- a/setup/class_setupStep_Config3.inc +++ b/setup/class_setupStep_Config3.inc @@ -26,7 +26,11 @@ class Step_Config3 extends setup_step var $errorlvl = TRUE; + var $login_attributes = array("uid" => "uid", + "mail" => "mail", + "uid,mail" => "both"); var $optional = array( + "login_attribute" => "uid", "strict_units" => false, "list_summary" => false, "forceglobals" => true, @@ -84,6 +88,7 @@ class Step_Config3 extends setup_step foreach($this->attributes as $attr){ $smarty->assign($attr,$this->$attr); } + $smarty->assign("login_attributes",$this->login_attributes); return($smarty -> fetch (get_template_path("../setup/setup_config3.tpl"))); } @@ -99,7 +104,7 @@ class Step_Config3 extends setup_step } } - foreach(array("list_summary","strict_units","snmpcommunity","noprimarygroup","forceglobals","forcessl","ldapstats","user_filter_cookie","warnssl","compile","debuglevel","session_lifetime") as $name){ + foreach(array("login_attribute","list_summary","strict_units","snmpcommunity","noprimarygroup","forceglobals","forcessl","ldapstats","user_filter_cookie","warnssl","compile","debuglevel","session_lifetime") as $name){ if(isset($_POST[$name])){ $this->optional[$name] = get_post($name); } diff --git a/setup/setup_config3.tpl b/setup/setup_config3.tpl index 4e649cf44..3093c34cb 100644 --- a/setup/setup_config3.tpl +++ b/setup/setup_config3.tpl @@ -163,6 +163,17 @@

{t}Login and session{/t}

+
+
+ {t}Login attribute{/t} +
+
+ +
+
+
{t}Enforce register_globals to be deactivated{/t}