[1349] | 1 | <?php |
---|
| 2 | /**************************************************************************\ |
---|
| 3 | * eGroupWare * |
---|
| 4 | * http://www.egroupware.org * |
---|
| 5 | * Written by Mark Peters <skeeter@phpgroupware.org> * |
---|
| 6 | * -------------------------------------------- * |
---|
| 7 | * This program is free software; you can redistribute it and/or modify it * |
---|
| 8 | * under the terms of the GNU General Public License as published by the * |
---|
| 9 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
| 10 | * option) any later version. * |
---|
| 11 | \**************************************************************************/ |
---|
| 12 | /** |
---|
| 13 | * @package Workflow |
---|
| 14 | * @license http://www.gnu.org/copyleft/gpl.html GPL |
---|
| 15 | */ |
---|
| 16 | // Delete all records for a user |
---|
| 17 | if((int)$_POST['new_owner'] == 0) |
---|
| 18 | { |
---|
| 19 | //remove user from role mappings |
---|
| 20 | ExecMethod('workflow.workflow_rolemanager.remove_user',(int)$_POST['account_id']); |
---|
| 21 | //remove user from user/owner/next_user of instances |
---|
| 22 | ExecMethod('workflow.workflow_instancemanager.remove_user',(int)$_POST['account_id']); |
---|
| 23 | //remove user from default_next_user of activities |
---|
| 24 | ExecMethod('workflow.workflow_activitymanager.remove_user',(int)$_POST['account_id']); |
---|
| 25 | } |
---|
| 26 | else |
---|
| 27 | { |
---|
| 28 | ExecMethod('workflow.workflow_rolemanager.transfer_user', |
---|
| 29 | Array( |
---|
| 30 | 'old_user' => (int)$_POST['account_id'], |
---|
| 31 | 'new_user' => (int)$_POST['new_owner'] |
---|
| 32 | ) |
---|
| 33 | ); |
---|
| 34 | ExecMethod('workflow.workflow_instancemanager.transfer_user', |
---|
| 35 | Array( |
---|
| 36 | 'old_user' => (int)$_POST['account_id'], |
---|
| 37 | 'new_user' => (int)$_POST['new_owner'] |
---|
| 38 | ) |
---|
| 39 | ); |
---|
| 40 | ExecMethod('workflow.workflow_activitymanager.transfer_user', |
---|
| 41 | Array( |
---|
| 42 | 'old_user' => (int)$_POST['account_id'], |
---|
| 43 | 'new_user' => (int)$_POST['new_owner'] |
---|
| 44 | ) |
---|
| 45 | ); |
---|
| 46 | } |
---|
| 47 | ?> |
---|