mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 15:33:23 +01:00
Fixed a problem with user not being added to the groups properly and the directorys wheren't being deleted
This commit is contained in:
parent
e39c2e8843
commit
34b5e461ae
@ -73,8 +73,8 @@
|
||||
|
||||
$sep = $phpgw->common->filesystem_sepeartor();
|
||||
|
||||
$basedir = $phpgw_info["server"]["server_root"] . $sep . "filemanager" . $sep . "users"
|
||||
. $sep;
|
||||
$basedir = $phpgw_info["server"]["server_root"] . $sep . "filemanager" . $sep
|
||||
. "groups" . $sep;
|
||||
|
||||
if (! @rmdir($basedir . $group_name)) {
|
||||
$cd = 38;
|
||||
|
@ -27,17 +27,20 @@
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
$phpgw->db->lock(array("accounts","groups"));
|
||||
//$phpgw->db->lock(array("accounts","groups"));
|
||||
|
||||
$phpgw->db->query("INSERT INTO groups (group_name,group_apps) VALUES "
|
||||
. "('$n_group','"
|
||||
. $phpgw->groups->array_to_string("none",$n_group_permissions) . "') ");
|
||||
$phpgw->db->query("SELECT group_id FROM groups WHERE group_name='$n_group'");
|
||||
$groups_con = $phpgw->db->f("group_id");
|
||||
$phpgw->db->next_record();
|
||||
$group_con = $phpgw->db->f("group_id");
|
||||
|
||||
for ($i=0; $i<count($n_users);$i++) {
|
||||
$phpgw->db->query("SELECT groups FROM accounts WHERE con=".$n_users[$i]);
|
||||
$phpgw->db->next_record();
|
||||
$user_groups = $phpgw->db->f("groups") . ",$group_con,";
|
||||
|
||||
$user_groups = ereg_replace(",,",",",$user_groups);
|
||||
$phpgw->db->query("UPDATE accounts SET groups='$user_groups' WHERE con="
|
||||
. $n_users[$i]);
|
||||
@ -52,7 +55,7 @@
|
||||
|
||||
if (! mkdir ($basedir . $n_group, 0707)) $cd = 37;
|
||||
|
||||
$phpgw->db->unlock();
|
||||
//$phpgw->db->unlock();
|
||||
|
||||
Header("Location: " . $phpgw->link("groups.php","cd=$cd"));
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user