Code

Added login attribute selection to setup
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 30 Oct 2007 11:21:36 +0000 (11:21 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 30 Oct 2007 11:21:36 +0000 (11:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7686 594d385d-05f5-0310-b6e9-bd551577e9d8

contrib/gosa.conf
setup/class_setupStep_Config3.inc
setup/setup_config3.tpl

index 701f8c4e2b4aa91a2efd851038ba93747e7f1dca..f4cdc3b87fbc6b61cd7e880413877038b3fb11ba 100644 (file)
                        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}
index 8033768c1cb4e4de96649da7c80b0400eee1187a..f0f30057c2e57cad7f5a8ce3fc5e9095446ac35a 100644 (file)
@@ -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);
         }
index 4e649cf4490da31ec0605105ccd42e36a9dcbdc0..3093c34cbf2157309590cf496a5994e8e43c67fb 100644 (file)
     </div>
 
     <p><b>{t}Login and session{/t}</b></p>
+    <div class='step4_container'>
+        <div class='step4_name'>
+            {t}Login attribute{/t}
+        </div>
+        <div class='step4_value'>
+            <select name="login_attribute" size="1" title="">
+               {html_options options=$login_attributes selected=$optional.login_attribute}
+            </select>
+        </div>
+    </div>
+
     <div class='step4_container'>
         <div class='step4_name'>
             {t}Enforce register_globals to be deactivated{/t}