mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
fixes for accounts
This commit is contained in:
parent
941f47ff4d
commit
4a93132396
@ -12,6 +12,8 @@
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info["flags"]["currentapp"] = "admin";
|
||||
$phpgw_info["flags"]["disable_message_class"] = True;
|
||||
$phpgw_info["flags"]["disable_send_class"] = True;
|
||||
include("../header.inc.php");
|
||||
|
||||
$t = new Template($phpgw_info["server"]["template_dir"]);
|
||||
@ -103,3 +105,4 @@
|
||||
$t->pparse("out","footer");
|
||||
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
?
|
||||
|
@ -50,7 +50,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<?
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
}
|
||||
|
||||
@ -59,6 +59,7 @@
|
||||
$phpgw->db->next_record();
|
||||
$lid = $phpgw->db->f(0);
|
||||
|
||||
$i = 0;
|
||||
$phpgw->db->query("select cal_id from webcal_entry where cal_create_by='$lid'");
|
||||
while ($phpgw->db->next_record()) {
|
||||
$cal_id[$i] = $phpgw->db->f("cal_id");
|
||||
|
@ -17,6 +17,8 @@
|
||||
Header("Location: " . $phpgw->link("groups.php"));
|
||||
|
||||
$phpgw_info["flags"]["currentapp"] = "admin";
|
||||
$phpgw_info["flags"]["disable_message_class"] = True;
|
||||
$phpgw_info["flags"]["disable_send_class"] = True;
|
||||
include("../header.inc.php");
|
||||
|
||||
if ((($group_id) && ($confirm)) || $removeusers) {
|
||||
@ -31,12 +33,12 @@
|
||||
if ($user_[1] == ",") {
|
||||
$user_[1] = "";
|
||||
}
|
||||
$phpgw->db->query("update accounts set account_groups='$user_[1]' where account_id='$user[0]'");
|
||||
$phpgw->db->query("update accounts set account_groups='$user_[1]' where account_id=$user[0]");
|
||||
}
|
||||
$confirm = True;
|
||||
}
|
||||
|
||||
$phpgw->db->query("select group_name from groups where group_id='$group_id'");
|
||||
$phpgw->db->query("select group_name from groups where group_id=$group_id");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$group_name = $phpgw->db->f("group_name");
|
||||
@ -63,11 +65,11 @@
|
||||
}
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw->db->query("select group_name from groups where group_id='$group_id'");
|
||||
$phpgw->db->query("select group_name from groups where group_id=$group_id");
|
||||
$phpgw->db->next_record();
|
||||
$group_name = $phpgw->db->f("group_name");
|
||||
|
||||
$phpgw->db->query("delete from groups where group_id='$group_id'");
|
||||
$phpgw->db->query("delete from groups where group_id=$group_id");
|
||||
|
||||
$sep = $phpgw->common->filesystem_separator();
|
||||
|
||||
@ -103,6 +105,6 @@
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<?
|
||||
<?php
|
||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||
|
||||
?>
|
||||
|
@ -79,11 +79,11 @@
|
||||
// If they changed there loginid, we need to change the owner in ALL
|
||||
// tables to reflect on the new one
|
||||
if ($lid != $n_loginid) {
|
||||
change_owner("","preferences","owner",$n_loginid,$lid);
|
||||
change_owner("addressbook","addressbook","owner",$n_loginid,$lid);
|
||||
change_owner("todo","todo","owner",$n_loginid,$lid);
|
||||
change_owner("","accounts","loginid",$n_loginid,$lid);
|
||||
change_owner("","sessions","loginid",$n_loginid,$lid);
|
||||
change_owner("","preferences","preference_owner",$n_loginid,$lid);
|
||||
change_owner("addressbook","addressbook","ab_owner",$n_loginid,$lid);
|
||||
change_owner("todo","todo","todo_owner",$n_loginid,$lid);
|
||||
change_owner("","accounts","account_lid",$n_loginid,$lid);
|
||||
change_owner("","sessions","session_lid",$n_loginid,$lid);
|
||||
change_owner("calendar","webcal_entry","cal_create_by",$n_loginid,$lid);
|
||||
change_owner("calendar","webcal_entry_user","cal_login",$n_loginid,$lid);
|
||||
|
||||
|
@ -49,16 +49,16 @@
|
||||
. $phpgw->accounts->add_app("",True)
|
||||
. "' where group_id=$group_id");
|
||||
$phpgw->db->query("SELECT group_id FROM groups WHERE group_name='$n_group'");
|
||||
$phpgw->db->next_record();
|
||||
$phpgw->db->next_record();
|
||||
$group_con = $phpgw->db->f("group_id");
|
||||
|
||||
for ($i=0; $i<count($n_users);$i++) {
|
||||
$phpgw->db->query("SELECT account_groups FROM accounts WHERE account_id=".$n_users[$i]);
|
||||
$phpgw->db->next_record();
|
||||
$phpgw->db->next_record();
|
||||
$user_groups = $phpgw->db->f("groups") . ",$group_con:0,";
|
||||
|
||||
$user_groups = ereg_replace(",,",",",$user_groups);
|
||||
$phpgw->db->query("UPDATE accounts SET account_groups='$user_groups' WHERE account_id='" . $n_users[$i] ."'");
|
||||
$phpgw->db->query("UPDATE accounts SET account_groups='$user_groups' WHERE account_id=".$n_users[$i]);
|
||||
}
|
||||
|
||||
$sep = $phpgw->common->filesystem_separator();
|
||||
@ -110,7 +110,7 @@
|
||||
$phpgw->db->query("select account_id from accounts where account_groups like '%,$group_id:%'");
|
||||
|
||||
while ($phpgw->db->next_record()) {
|
||||
$selected_users[$phpgw->db->f("con")] = " selected";
|
||||
$selected_users[$phpgw->db->f("account_id")] = " selected";
|
||||
}
|
||||
|
||||
$gp = $phpgw->accounts->read_group_apps($group_id);
|
||||
|
Loading…
Reference in New Issue
Block a user