Code

Added skip values
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 31 Mar 2008 12:45:49 +0000 (12:45 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 31 Mar 2008 12:45:49 +0000 (12:45 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10085 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/acl/class_aclManagement.inc
gosa-core/plugins/admin/groups/class_groupManagement.inc
gosa-core/plugins/personal/generic/class_user.inc
gosa-core/plugins/personal/posix/class_posixAccount.inc

index 65af9065b729db1852ba9f45f10237ab954ac6bd..342a16e99a4397ea82c1a52849ec65f1242e7869 100644 (file)
@@ -641,7 +641,7 @@ class aclManagement extends plugin
     echo "SAVE ACL";
   } 
 
-  function adapt_from_template($dn) { } 
+  function adapt_from_template($dn, $skip) { } 
   function password_change_needed() { } 
 
 
index 4a2aa2a2ce8e93ff34f5ef33ac78ae44cf9b46bb..00d0146448bfbd9eb938dd3d617be03e0002ea66 100644 (file)
@@ -788,7 +788,7 @@ class groupManagement extends plugin
 
   /* Unused functions  */
   function check()  { }
-  function adapt_from_template($dn) { }
+  function adapt_from_template($dn, $skip) { }
   function password_change_needed()  { }
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index 1ad2c92648c6e8661346c29412f977183a6a4b70..aa37dc920e95ef776b3c1a389f749cca1227abd4 100644 (file)
@@ -1300,9 +1300,9 @@ class user extends plugin
   }
 
   /* Adapt from given 'dn' */
-  function adapt_from_template($dn)
+  function adapt_from_template($dn, $skip= array())
   {
-    plugin::adapt_from_template($dn);
+    plugin::adapt_from_template($dn, $skip);
 
     /* Get base */
     $this->base= preg_replace('/^[^,]+,'.get_people_ou().'/i', '', $dn);
@@ -1329,8 +1329,8 @@ class user extends plugin
       }
     }
 
-    /* Get back uid/sn/givenName */
-    if ($this->parent !== NULL){
+    /* Get back uid/sn/givenName - only write if nothing's skipped */
+    if ($this->parent !== NULL && count($skip) != 0){
       $this->uid= $this->parent->uid;
       $this->sn= $this->parent->sn;
       $this->givenName= $this->parent->givenName;
index a2bcd4c56137c8afcf00ffbf97f83cffc38dc429..596f519dfd68c211c842bc649aff1d602afbb4a1 100644 (file)
@@ -1175,12 +1175,12 @@ class posixAccount extends plugin
 
 
   /* Adapt from template, using 'dn' */
-  function adapt_from_template($dn)
+  function adapt_from_template($dn, $skip= array())
   {
     /* Include global link_info */
     $ldap= $this->config->get_ldap_link();
 
-    plugin::adapt_from_template($dn);
+    plugin::adapt_from_template($dn, $skip);
     $template= $this->attrs['uid'][0];
 
     /* Adapt group membership */