[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] admin/inc/class.uiaccounts.inc.php, 1.41
From: |
nomail |
Subject: |
[Phpgroupware-cvs] admin/inc/class.uiaccounts.inc.php, 1.41 |
Date: |
Wed, 23 Jun 2004 16:59:45 +0200 |
Update of /admin/inc
Modified Files:
Branch:
class.uiaccounts.inc.php
date: 2004/06/23 14:59:45; author: fipsfuchs; state: Exp; lines: +40 -32
Log Message:
you are able to delete an account now
=====================================================================
Index: admin/inc/class.uiaccounts.inc.php
diff -u admin/inc/class.uiaccounts.inc.php:1.40
admin/inc/class.uiaccounts.inc.php:1.41
--- admin/inc/class.uiaccounts.inc.php:1.40 Wed Jun 23 11:27:06 2004
+++ admin/inc/class.uiaccounts.inc.php Wed Jun 23 14:59:45 2004
@@ -952,38 +952,46 @@
return False;
}
- unset($GLOBALS['phpgw_info']['flags']['noheader']);
- unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
- $GLOBALS['phpgw']->common->phpgw_header();
-
- $t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
- $t->set_file(
- Array(
- 'form' => 'delete_account.tpl'
- )
- );
- $var = Array(
- 'form_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.boaccounts.delete_user'),
- 'account_id' => $_GET['account_id']
- );
-
- // the account can have special chars/white spaces, if
it is a ldap dn
- $account_id = rawurlencode($_GET['account_id']);
-
- // Find out who the new owner is of the deleted users
records...
- $users =
$GLOBALS['phpgw']->accounts->get_list('accounts');
- $c_users = count($users);
- $str = '';
- for($i=0;$i<$c_users;$i++)
- {
- $str .= '<option
value='.$users[$i]['account_id'].'>'.$GLOBALS['phpgw']->common->display_fullname($users[$i]['account_lid'],$users[$i]['account_firstname'],$users[$i]['account_lastname']).'</option>'."\n";
- }
- $var['lang_new_owner'] = lang('Who would you like to
transfer ALL records owned by the deleted user to?');
- $var['new_owner_select'] = '<select name="new_owner"
size="5">'."\n".'<option value=0 selected>'.lang('Delete All
Records').'</option>'."\n".$str.'</select>'."\n";
- $var['cancel'] = lang('cancel');
- $var['delete'] = lang('delete');
- $t->set_var($var);
- $t->pparse('out','form');
+ $id2delete = $_REQUEST['account_id'];
+
+ if($_REQUEST['deleteAccount'])
+ {
+
if($this->bo->delete_user($_REQUEST['deleteID'], $_REQUEST['account']))
+ {
+ $this->list_users();
+ }
+ else
+ {
+ //what now?
+ }
+ }
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('administration');
+
+ // get account list for new owner
+ $accounts = CreateObject('phpgwapi.accounts');
+ $accounts = $accounts->get_list('accounts');
+ for($i=0; $i < count($accounts); $i++)
+ {
+ if((int)$accounts[$i]['account_id'] !=
$id2delete)
+ {
+ $accountlist[] = array
+ (
+ 'account_id' =>
$accounts[$i]['account_id'],
+ 'account_name' =>
$GLOBALS['phpgw']->common->display_fullname($accounts[$i]['account_lid'],
+
$accounts[$i]['account_firstname'],
+
$accounts[$i]['account_lastname']
+
)
+ );
+ }
+ }
+ $data = array ('delete_id' => $id2delete,
+ 'accountlist' => $accountlist,
+ 'lang_new_owner' => lang('Who would you
like to transfer ALL records owned by the deleted user to?'),
+ 'l_cancel' => lang('cancel'),
+ 'l_delete' => lang('delete')
+ );
+
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('new_owner_list' => $data));
}
function group_manager($cd='',$account_id='')
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] admin/inc/class.uiaccounts.inc.php, 1.41,
nomail <=