From: cajus Date: Wed, 11 Jul 2007 10:17:13 +0000 (+0000) Subject: Fixed multiple saving of "My account" data. This closes #96 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fa4a344d309709b88b26de63f06fece3f0e9fa9e;p=gosa.git Fixed multiple saving of "My account" data. This closes #96 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6831 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/connectivity/main.inc b/plugins/personal/connectivity/main.inc index 5911fc53a..a418ef40f 100644 --- a/plugins/personal/connectivity/main.inc +++ b/plugins/personal/connectivity/main.inc @@ -77,8 +77,8 @@ if (!$remove_lock){ del_lock ($ui->dn); sess_del ('edit'); - /* Write back to session */ - $_SESSION['connectivity']= $connectivity; + /* Remove from session */ + sess_del ('connectivity'); } else { /* Errors found, show message */ show_errors ($message); diff --git a/plugins/personal/environment/main.inc b/plugins/personal/environment/main.inc index fcca1cb67..ecd19f8d2 100644 --- a/plugins/personal/environment/main.inc +++ b/plugins/personal/environment/main.inc @@ -70,8 +70,8 @@ if (!$remove_lock){ del_lock ($ui->dn); sess_del ('edit'); - /* Store object */ - $_SESSION['environment']= $environment; + /* Remove object */ + sess_del ('environment'); } else { /* Errors found, show message */ show_errors ($message); diff --git a/plugins/personal/generic/main.inc b/plugins/personal/generic/main.inc index b54dab249..fd94caf3d 100644 --- a/plugins/personal/generic/main.inc +++ b/plugins/personal/generic/main.inc @@ -103,6 +103,7 @@ if (!$remove_lock){ } del_lock ($ui->dn); + sess_del ('user'); } /* save changes to LDAP and disable edit mode */ @@ -117,13 +118,15 @@ if (!$remove_lock){ del_lock ($ui->dn); sess_del ('edit'); - /* Save object */ - $_SESSION['user']= $user; - /* Need to reset the password? */ if($user->password_change_needed()){ + /* Save object */ + $_SESSION['user']= $user; + $display.= $smarty->fetch(get_template_path('password.tpl', TRUE)); return ($display); + } else { + sess_del ('user'); } } else { diff --git a/plugins/personal/mail/main.inc b/plugins/personal/mail/main.inc index f79cb140d..a381598e9 100644 --- a/plugins/personal/mail/main.inc +++ b/plugins/personal/mail/main.inc @@ -72,8 +72,8 @@ if (!$remove_lock){ del_lock ($ui->dn); sess_del ('edit'); - /* Store object */ - $_SESSION['mailAccount']= $mailAccount; + /* Remove object */ + sess_del ('mailAccount'); } else { /* Errors found, show message */ show_errors ($message); diff --git a/plugins/personal/nagios/main.inc b/plugins/personal/nagios/main.inc index 30b1101f6..6ad13a128 100644 --- a/plugins/personal/nagios/main.inc +++ b/plugins/personal/nagios/main.inc @@ -73,8 +73,8 @@ if (!$remove_lock){ del_lock ($ui->dn); sess_del ('edit'); - /* Store object */ - $_SESSION['nagiosAccount']= $nagiosAccount; + /* Remove object */ + sess_del ('nagiosAccount'); } else { /* Errors found, show message */ show_errors ($message); diff --git a/plugins/personal/netatalk/main.inc b/plugins/personal/netatalk/main.inc index aec2b9a49..badd66523 100644 --- a/plugins/personal/netatalk/main.inc +++ b/plugins/personal/netatalk/main.inc @@ -68,8 +68,8 @@ if (!$remove_lock) { del_lock($ui->dn); sess_del('edit'); - /* Store object */ - $_SESSION['netatalk'] = $netatalk; + /* Remove object */ + sess_del('netatalk'); } else { /* Errors found, show message */ show_errors($message); diff --git a/plugins/personal/posix/main.inc b/plugins/personal/posix/main.inc index d9af554e0..fffb199d9 100644 --- a/plugins/personal/posix/main.inc +++ b/plugins/personal/posix/main.inc @@ -74,8 +74,8 @@ if (!$remove_lock){ del_lock ($ui->dn); sess_del ('edit'); - /* Write back to session */ - $_SESSION['posixAccount']= $posixAccount; + /* Remove from session */ + sess_del ('posixAccount'); } else { /* Errors found, show message */ show_errors ($message); diff --git a/plugins/personal/samba/main.inc b/plugins/personal/samba/main.inc index d1725d192..8719e50e4 100644 --- a/plugins/personal/samba/main.inc +++ b/plugins/personal/samba/main.inc @@ -73,8 +73,8 @@ if (!$remove_lock){ del_lock ($ui->dn); sess_del ('edit'); - /* Reload */ - $_SESSION['sambaAccount']= $sambaAccount; + /* Remove from session */ + sess_del ('sambaAccount'); } else { /* Errors found, show message */ show_errors ($message); diff --git a/plugins/personal/scalix/main.inc b/plugins/personal/scalix/main.inc index c5db32903..a16a3c2d5 100644 --- a/plugins/personal/scalix/main.inc +++ b/plugins/personal/scalix/main.inc @@ -73,8 +73,8 @@ if (!$remove_lock){ del_lock ($ui->dn); sess_del ('edit'); - /* Store object */ - $_SESSION['scalixAccount']= $scalixAccount; + /* Remove object */ + sess_del ('scalixAccount'); } else { /* Errors found, show message */ show_errors ($message);