From 7bc83f3ab8b321bc2cbd756ab70269ad164088b9 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 6 Sep 2010 08:46:09 +0000 Subject: [PATCH] Updated MyAccount tabs -Let the tab object move the user object. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19521 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/myaccount/MyAccountTabs.inc | 52 +++++++++---------- gosa-core/plugins/personal/myaccount/main.inc | 2 + 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/gosa-core/plugins/personal/myaccount/MyAccountTabs.inc b/gosa-core/plugins/personal/myaccount/MyAccountTabs.inc index a65d980b2..4ca8cd245 100644 --- a/gosa-core/plugins/personal/myaccount/MyAccountTabs.inc +++ b/gosa-core/plugins/personal/myaccount/MyAccountTabs.inc @@ -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() diff --git a/gosa-core/plugins/personal/myaccount/main.inc b/gosa-core/plugins/personal/myaccount/main.inc index c591fc7b5..ccc1d517e 100644 --- a/gosa-core/plugins/personal/myaccount/main.inc +++ b/gosa-core/plugins/personal/myaccount/main.inc @@ -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); -- 2.30.2