mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
* Admin: Add filemanager (home directory) as an option to move to new user when deleting an account
This commit is contained in:
parent
fb20fe69dd
commit
1eda093753
@ -319,6 +319,16 @@ class admin_account
|
||||
);
|
||||
}
|
||||
}
|
||||
// Add filemanager home directory in as special case, hook is in the API
|
||||
if(Api\Vfs::file_exists('/home/'.$GLOBALS['egw']->accounts->id2name($content['account_id'])))
|
||||
{
|
||||
$app = 'filemanager';
|
||||
$sel_options['delete_apps'][] = array(
|
||||
'value' => $app,
|
||||
'label' => lang($app) . ': ' . lang('home directory')
|
||||
);
|
||||
$content['delete_apps'][] = $app;
|
||||
}
|
||||
$tpl = new Etemplate('admin.account.delete');
|
||||
$tpl->exec('admin_account::delete', $content, $sel_options, array(), $preserve, 2);
|
||||
}
|
||||
|
@ -206,6 +206,10 @@ class admin_cmd_delete_account extends admin_cmd
|
||||
$skip_apps[] = $app;
|
||||
Api\Hooks::single(array_merge($GLOBALS['hook_values'], array('new_owner' => 0)), $app, true);
|
||||
}
|
||||
|
||||
// Filemanager is a special case, since the hook is in API not filemanager
|
||||
$vfs_new_owner = in_array('filemanager', $this->change_apps) ? $new_user : 0;
|
||||
Api\Vfs\Hooks::deleteAccount(array_merge($GLOBALS['hook_values'], array('new_owner' => $vfs_new_owner)));
|
||||
|
||||
// first all other apps, then preferences, admin & api
|
||||
foreach(array_merge($this->change_apps,$do_last) as $app)
|
||||
|
Loading…
Reference in New Issue
Block a user