diff --git a/lam/lib/account.inc b/lam/lib/account.inc index f0f1976e..e777f2a8 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -344,8 +344,13 @@ class accountContainer { */ function continue_main($post) { if ($this->module['main']->subpage=='') $this->module['main']->subpage='attributes'; - $function = '$result = $this->module[$this->order[$this->module[\'main\']->current_page]]->proccess_'.$this->module['main']->subpage.'($post);'; - eval ($function); + if ($post['form_main_reset']) { + $this->load_account($this->dn_orig); + } + else { + $function = '$result = $this->module[$this->order[$this->module[\'main\']->current_page]]->proccess_'.$this->module['main']->subpage.'($post);'; + eval ($function); + } if (is_string($result)) $this->module['main']->subpage = $result; if (is_int($result)) for ($i=0; $iorder); $i++ ) @@ -353,11 +358,11 @@ class accountContainer { $this->module['main']->current_page = $i; $this->module['main']->subpage='attributes'; } - // Write HTML-Code echo $_SESSION[$this->header2]; echo ""; - echo _("Create new Account"); + if ($this->dn_orig!='') echo _("Modify Account"); + else echo _("Create new Account"); echo "\n"; echo "\n"; echo "\n"; @@ -365,7 +370,6 @@ class accountContainer { // Display errir-messages if (is_array($result)) for ($i=0; $i\n"; echo ""; @@ -387,13 +391,17 @@ class accountContainer { echo "\">\n
"; } } - // *** Fixme add reset-button + if ($this->dn_orig!='') echo "
\n"; echo "\n"; echo "
\n"; + echo "
type."edit-dark\">type."edit-bright\">"; + echo $this->module[$this->order[$this->module['main']->current_page]]->alias; + echo "\n"; // display html-code from mdule $function = '$result = $this->module[$this->order[$this->module[\'main\']->current_page]]->display_html_'.$this->module['main']->subpage.'($post);'; eval ($function); // Display rest of html-page + echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -674,7 +682,7 @@ class accountContainer { $entry = ldap_first_entry($_SESSION[$this->ldap]->server(), $result); $this->dn = substr($dn, strpos($dn, ',')+1); $this->dn_orig = $dn; - $attr = ldap_get_attributes($_SESSION['ldap']->server(), $entry); + $attr = ldap_get_attributes($_SESSION[$this->ldap]->server(), $entry); if (isset($attr['objectClass']['count'])) unset($attr['objectClass']['count']); // load attributes foreach ($attr['objectClass'] as $objectClass) { @@ -899,6 +907,7 @@ class accountContainer { } +/* // This class keeps all needed values for any account class account { // Type : user | group | host @@ -947,6 +956,7 @@ class account { * mountpoint, used blocks, soft block limit, hard block limit, grace block period, used inodes, * soft inode limit, hard inode limit, grace inode period */ +/* // Personal Settings var $personal_title; // string title of user var $personal_mail; // string mailaddress of user @@ -958,6 +968,9 @@ class account { var $personal_postalAddress; // string postal Address of user var $personal_employeeType; // string employe type of user } +*/ + + /* Return a list of all shells listed in ../config/shells * Normally ../config/shells is a symbolic link to /etc/shells diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 4d02c2ec..9244870d 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -79,7 +79,6 @@ class posixAccount { // Make references to attributes which already esists in ldap $newattributes = array_keys($this->attributes); $module = array_keys($_SESSION[$this->base]->module); - // fixme *** do we have to unset module posixAccuont itself for ($i=0; $ibase]->module[$module[$i]]->attributes[$attribute])) $this->attributes[$attribute] =& $_SESSION[$this->base]->module[$module[$i]]->attributes[$attribute]; diff --git a/lam/lib/modules/sambaAccount.inc b/lam/lib/modules/sambaAccount.inc index 0c251f89..43235e55 100644 --- a/lam/lib/modules/sambaAccount.inc +++ b/lam/lib/modules/sambaAccount.inc @@ -74,7 +74,6 @@ class sambaAccount { // Make references to attributes which already esists in ldap $newattributes = array_keys($this->attributes); $module = array_keys($_SESSION[$this->base]->module); - // fixme *** do we have to unset module sambaAccount itself for ($i=0; $ibase]->module[$module[$i]]->attributes[$attribute])) $this->attributes[$attribute] =& $_SESSION[$this->base]->module[$module[$i]]->attributes[$attribute]; diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index 932e9de5..bcd2f54f 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -74,7 +74,6 @@ class sambaSamAccount { // Make references to attributes which already esists in ldap $newattributes = array_keys($this->attributes); $module = array_keys($_SESSION[$this->base]->module); - // fixme *** do we have to unset module sambaSamAccount itself for ($i=0; $ibase]->module[$module[$i]]->attributes[$attribute])) $this->attributes[$attribute] =& $_SESSION[$this->base]->module[$module[$i]]->attributes[$attribute]; diff --git a/lam/lib/modules/shadowAccount.inc b/lam/lib/modules/shadowAccount.inc index c996896e..c96065f2 100644 --- a/lam/lib/modules/shadowAccount.inc +++ b/lam/lib/modules/shadowAccount.inc @@ -70,7 +70,6 @@ class shadowAccount { // Make references to attributes which already esists in ldap $newattributes = array_keys($this->attributes); $module = array_keys($_SESSION[$this->base]->module); - // fixme *** do we have to unset module shadowAccount itself for ($i=0; $ibase]->module[$module[$i]]->attributes[$attribute])) $this->attributes[$attribute] =& $_SESSION[$this->base]->module[$module[$i]]->attributes[$attribute];