summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 04e5e62)
raw | patch | inline | side by side (parent: 04e5e62)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 31 Mar 2008 12:33:19 +0000 (12:33 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 31 Mar 2008 12:33:19 +0000 (12:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10084 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/users/class_divListUsers.inc | patch | blob | history | |
gosa-core/plugins/admin/users/class_userManagement.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/users/class_divListUsers.inc b/gosa-core/plugins/admin/users/class_divListUsers.inc
index eddb2bd024e8ff2a942eada5bb2a10293c4929a1..33bb37809a471fe3d6050c7a30c45520b5022ef6 100644 (file)
" "._("Change password")."|"."multiple_password_change|\n";
$s.= "..|<img src='images/edittrash.png' alt='' border='0' class='center'>".
" "._("Remove")."|"."remove_multiple|\n";
+ $s.= "..|<img src='images/wizard.png' alt='' border='0' class='center'>".
+ " "._("Apply template")."|"."templatize_multiple|\n";
/* Add event tag */
if(class_available("DaemonEvent")){
diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc
index 5fa8b015666189b885218a0ba214fde962e768eb..cc9ba18c8d6a1bb4d4401dd501243b4278307ba0 100644 (file)
if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){
$s_action = "del_multiple";
}
+ if(isset($_POST['menu_action']) && preg_match("/^templatize_multiple/",$_POST['menu_action'])){
+ $s_action = "templatize_multiple";
+ }
if(isset($_POST['menu_action']) && preg_match("/^event/",$_POST['menu_action'])){
$s_action = $_POST['menu_action'];
session::un_set('objectinfo');
}
+ /* Apply templates */
+ if ($s_action=="templatize_multiple"){
+ $ids = $this->list_get_selected_items();
+ $this->dns = array();
+ if(count($ids)){
+
+ foreach($ids as $id){
+ $dn = $this->list[$id]['dn'];
+ if (($user= get_lock($dn)) != ""){
+ return(gen_locked_message ($user, $dn));
+ }
+ $this->dns[$id] = $dn;
+ }
+ }
+
+ # Test stuff
+ foreach ($this->dns as $dn){
+
+ echo "Template test with '$dn'<br>";
+ $template_dn= "cn=super44 super44,ou=people,dc=gonicus,dc=de";
+ $usertab= new usertabs($this->config, $this->config->data['TABS']['USERTABS'], $dn);
+ $usertab->adapt_from_template($template_dn, array("sn", "givenName", "uid"));
+ #$usertab->save();
+ unset ($usertab);
+ $usertab= NULL;
+ }
+
+ }
/********************
Delete MULTIPLE entries requested, display confirm dialog
function remove_from_parent() { }
function check() { }
function save() { }
- function adapt_from_template($dn) { }
+ function adapt_from_template($dn, $skip= array()) { }
function password_change_needed() { }
} /* ... class userManagement */