Code

Fixed 818, closes #818
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 4 Jan 2010 08:30:07 +0000 (08:30 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 4 Jan 2010 08:30:07 +0000 (08:30 +0000)
-Do not display template list when creating users, while no templates are available.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14993 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/users/class_userManagement.inc

index eba470ebf957eaf0db7aaef90fe6bf16e83afd72..67b0f6c9cabc3330f7de3c84ca7092425be77ffe 100644 (file)
@@ -306,7 +306,9 @@ class userManagement extends management
   {
     management::cancelEdit();
 
-    if(isset($this->last_tabObject->by_object['user']) && $this->last_tabObject->by_object['user']->password_change_needed()){
+    if(isset($this->last_tabObject->by_object['user']) && 
+        $this->last_tabObject->by_object['user']->dn != "new" &&  
+        $this->last_tabObject->by_object['user']->password_change_needed()){
       $this->force_hash_type[$this->last_tabObject->dn] = $this->last_tabObject->by_object['user']->pw_storage;
       $this->pwd_change_queue[] = $this->last_tabObject->dn;
       return($this->handlePasswordQueue());
@@ -365,7 +367,7 @@ class userManagement extends management
     $templates = array_merge($templates,$this->get_templates());
 
     // Display template selection
-    if (count($templates)){
+    if (count($templates) > 1){
       $smarty = get_smarty();
   
       // Set default variables, normally empty.