a65d980b2f12f1cbbfdffbc43f2a2b382fcbabce
1 <?php
2 /*
3 * This code is part of GOsa (http://www.gosa-project.org)
4 * Copyright (C) 2003-2008 GONICUS GmbH
5 *
6 * ID: $$Id: tabs_user.inc 14136 2009-08-26 08:02:49Z hickert $$
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
23 class MyAccountTabs extends tabs
24 {
25 var $password_change_needed = FALSE;
27 function remove_lock()
28 {
29 echo "Implement remove Lock !!!!!";;
30 }
34 # var $base;
35 #
36 # /* Template adaption variables
37 # */
38 # var $uid ="";
39 # var $givenName = "";
40 # var $sn;
41 #
42 # function usertabs($config, $data, $dn, $cat = "", $hide_refs = FALSE, $hide_acls = FALSE)
43 # {
44 # tabs::tabs($config, $data, $dn, 'users',$hide_refs, $hide_acls);
45 # $this->base= $this->by_object['user']->base;
46 #
47 # $this->uid = &$this->by_object['user']->uid;
48 # $this->sn = &$this->by_object['user']->sn;
49 # $this->givenName = &$this->by_object['user']->givenName;
50 #
51 # /* Add references/acls/snapshots */
52 # $this->addSpecialTabs();
53 #
54 # }
55 #
56 # function save_object($save_current= FALSE)
57 # {
58 # tabs::save_object($save_current);
59 #
60 # /* Update reference, transfer variables */
61 # $baseobject= $this->by_object['user'];
62 # foreach ($this->by_object as $name => $obj){
63 #
64 # /* Adding uid to sub plugins of connectivity */
65 # if($name == "connectivity"){
66 # foreach ($obj->plugin_name as $plg_name){
67 # if(isset($obj->plugin[$plg_name]->uid)){
68 # $obj->plugin[$plg_name]->uid = $baseobject->uid;
69 # }
70 # }
71 # }
72 #
73 # /* Don't touch base object */
74 # if ($name != 'user'){
75 # $obj->parent= &$this;
76 # $obj->uid= $baseobject->uid;
77 # $obj->sn= $baseobject->uid;
78 # $obj->givenName= $baseobject->uid;
79 # }
80 #
81 # /* Copy mail if needed */
82 # if ($name == "gofaxAccount"){
83 # if (isset($this->by_object['mailAccount']) && $this->by_object['mailAccount']->is_account){
84 # $obj->mail= $this->by_object['mailAccount']->mail;
85 # }
86 # }
87 #
88 # $this->by_object[$name]= $obj;
89 #
90 # /* Update parent in base object */
91 # $this->by_object['user']->parent= &$this;
92 # }
93 #
94 # /* Move facsimile / phone number if nessecary */
95 # if ($this->last == "user" && isset($this->by_object['gofaxAccount'])){
96 #
97 # /* Move number to fax plugin */
98 # $this->by_object['gofaxAccount']->facsimileTelephoneNumber=
99 # $this->by_object['user']->facsimileTelephoneNumber;
100 #
101 # /* Move phone number if plugin exists */
102 # if (isset($this->by_object['phoneAccount']) &&
103 # !$this->by_object['phoneAccount']->is_account){
104 # $this->by_object['phoneAccount']->phoneNumbers= array();
105 # if ($this->by_object['user']->telephoneNumber != ""){
106 # $this->by_object['phoneAccount']->phoneNumbers[$this->by_object['user']->telephoneNumber]= $this->by_object['user']->telephoneNumber;
107 # }
108 # }
109 # }
110 #
111 # /* Move number from fax plugin */
112 # if ($this->last == "gofaxAccount"){
113 #
114 # $this->by_object['user']->facsimileTelephoneNumber=
115 # $this->by_object['gofaxAccount']->facsimileTelephoneNumber;
116 # }
117 #
118 # /* Move number from fax plugin */
119 # if ($this->last == "phoneAccount" && $this->by_object['phoneAccount']->is_account){
120 # reset($this->by_object['phoneAccount']->phoneNumbers);
121 # $number= key($this->by_object['phoneAccount']->phoneNumbers);
122 #
123 # /* Only the first phoneAccount number, if it is not empty */
124 # if(!empty($number)){
125 # $this->by_object['user']->telephoneNumber= $number;
126 # }
127 # }
128 #
129 # /* Possibly change acl base */
130 # $this->set_acl_base();
131 # }
132 #
133 # function save($ignore_account= FALSE)
134 # {
135 # /* Check for new 'dn', in order to propagate the
136 # 'dn' to all plugins */
137 # $baseobject= $this->by_object['user'];
138 # $baseobject->update_new_dn();
139 # if ($this->dn != 'new'){
140 #
141 # $new_dn= $baseobject->new_dn;
142 #
143 # if ($this->dn != $new_dn){
144 #
145 # /* Udpate acls */
146 # $baseobject->update_acls($this->dn,$new_dn);
147 # $baseobject->move($this->dn, $new_dn);
148 # $this->by_object['user']= $baseobject;
149 #
150 # /* Did we change ourselves? Update ui object. */
151 # change_ui_dn($this->dn, $new_dn);
152 # }
153 # }
154 #
155 # $this->dn= $baseobject->new_dn;
156 #
157 # return tabs::save();
158 # }
159 #
160 #
161 # function set_template_mode()
162 # {
163 # foreach ($this->by_object as $key => $obj){
164 # $this->by_object[$key]->is_template= TRUE;
165 # }
166 # }
167 #
168 # function saveCopyDialog()
169 # {
170 # tabs::saveCopyDialog();
171 # $baseobject= $this->by_object['user'];
172 # $uid = $baseobject->uid;
173 # foreach($this->by_object as $name => $obj){
174 # $this->by_object[$name]->uid = $uid;
175 # }
176 # }
177 #
178 }
180 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
181 ?>