Code

Updated MyAccount tabs
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 6 Sep 2010 08:46:09 +0000 (08:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 6 Sep 2010 08:46:09 +0000 (08:46 +0000)
-Let the tab object move the user object.

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

gosa-core/plugins/personal/myaccount/MyAccountTabs.inc
gosa-core/plugins/personal/myaccount/main.inc

index a65d980b2f12f1cbbfdffbc43f2a2b382fcbabce..4ca8cd245d3507265a1c194f189dbad757f0c718 100644 (file)
@@ -130,32 +130,32 @@ class MyAccountTabs extends tabs
 #   $this->set_acl_base();
 # }
 #
-# function save($ignore_account= FALSE)
-# {
-#   /* Check for new 'dn', in order to propagate the
-#      'dn' to all plugins */
-#   $baseobject= $this->by_object['user'];
-#   $baseobject->update_new_dn();
-#   if ($this->dn != 'new'){
-#
-#     $new_dn= $baseobject->new_dn;
-#
-#     if ($this->dn != $new_dn){
-#
-#       /* Udpate acls */
-#       $baseobject->update_acls($this->dn,$new_dn);
-#       $baseobject->move($this->dn, $new_dn);
-#       $this->by_object['user']= $baseobject;
-#
-#       /* Did we change ourselves? Update ui object. */
-#       change_ui_dn($this->dn, $new_dn);
-#     }
-#   }
-#
-#   $this->dn= $baseobject->new_dn;
-#
-#   return tabs::save();
-# }
+  function save($ignore_account= FALSE)
+  {
+      /* Check for new 'dn', in order to propagate the
+         'dn' to all plugins */
+      $baseobject= $this->by_object['user'];
+      $baseobject->update_new_dn();
+      if ($this->dn != 'new'){
+
+          $new_dn= $baseobject->new_dn;
+
+          if ($this->dn != $new_dn){
+
+              /* Udpate acls */
+              $baseobject->update_acls($this->dn,$new_dn);
+              $baseobject->move($this->dn, $new_dn);
+              $this->by_object['user']= $baseobject;
+
+              /* Did we change ourselves? Update ui object. */
+              change_ui_dn($this->dn, $new_dn);
+          }
+      }
+
+      $this->dn= $baseobject->new_dn;
+
+      return tabs::save();
+  }
 #
 #
 # function set_template_mode()
index c591fc7b50a0eaa756f57ed67376c09272c16aa7..ccc1d517e023570e2e640962375727bdead76df0 100644 (file)
@@ -93,6 +93,8 @@ if (! $cleanup ){
                     $MyAccountTabs->password_change_needed = TRUE;
                 }else{
                     session::un_set ('MyAccountTabs');
+                    $MyAccountTabs= new MyAccountTabs($config,$config->data['TABS']['MYACCOUNTTABS'], $ui->dn, "users", true, true); 
+                    $MyAccountTabs->setReadOnly(TRUE);
                 }
             } else {
                 msg_dialog::displayChecks($message);