[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] admin/inc/class.uiaccounts.inc.php, 1.45
From: |
nomail |
Subject: |
[Phpgroupware-cvs] admin/inc/class.uiaccounts.inc.php, 1.45 |
Date: |
Fri, 25 Jun 2004 14:27:44 +0200 |
Update of /admin/inc
Modified Files:
Branch:
class.uiaccounts.inc.php
date: 2004/06/25 12:27:44; author: fipsfuchs; state: Exp; lines: +29 -26
Log Message:
move tpl vars for view account
refactoring of delete_user
=====================================================================
Index: admin/inc/class.uiaccounts.inc.php
diff -u admin/inc/class.uiaccounts.inc.php:1.44
admin/inc/class.uiaccounts.inc.php:1.45
--- admin/inc/class.uiaccounts.inc.php:1.44 Fri Jun 25 08:23:52 2004
+++ admin/inc/class.uiaccounts.inc.php Fri Jun 25 12:27:44 2004
@@ -781,20 +781,23 @@
}
$i++;
}
+
// Labels
-/*
$userData['l_action'] = lang('View user
account');
$userData['l_loginid'] = lang('LoginID');
$userData['l_account_active'] = lang('Account
active');
$userData['l_password'] = lang('Password');
- $userData['l_reenter_password'] = lang('Re-Enter
Password'),
- 'lang_lastname' => lang('Last Name'),
- 'lang_groups' => lang('Groups'),
- 'lang_firstname' => lang('First Name'),
- 'lang_lastlogin' => lang('Last login'),
- 'lang_lastloginfrom' => lang('Last login from'),
- 'lang_expires' => lang('Expires')
- */
+ $userData['l_lastname'] = lang('Last Name');
+ $userData['l_groups'] = lang('Groups');
+ $userData['l_firstname'] = lang('First Name');
+ $userData['l_lastlogin'] = lang('Last login');
+ $userData['l_lastloginfrom'] = lang('Last login
from');
+ $userData['l_expires'] = lang('Expires');
+ $userData['l_back'] = lang('Back');
+
+ // Interactions
+ $userData['i_back'] =
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_users');
+
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('administration');
$GLOBALS['phpgw']->xslttpl->add_file('users');
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('account_view' => $userData));
@@ -860,13 +863,27 @@
$this->list_users();
return False;
}
-
+
$id2delete = $_REQUEST['account_id'];
-
- if(!$_REQUEST['deleteAccount'])
+ if($_REQUEST['deleteAccount'])
+ {
+
if(!$this->bo->delete_user($_REQUEST['deleteID'], $_REQUEST['account']))
+ {
+ //Add error message here
+ }
+ }
+ if($_REQUEST['cancel'] || $_REQUEST['deleteAccount'])
+ {
+ $this->list_users();
+ }
+ else
{
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('administration');
+ //Add list entry to delete all references to
this account (user)
+ $accountlist[0] = array('account_id' => '0',
+ 'account_name' =>
lang('Delete all entries')
+ );
// get account list for new owner
$accounts = CreateObject('phpgwapi.accounts');
$accounts = $accounts->get_list('accounts');
@@ -890,24 +907,10 @@
'l_cancel' =>
lang('cancel'),
'l_delete' =>
lang('delete')
);
-
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('new_owner_list' => $data));
}
- // if($_REQUEST['cancel']) the account will not be
deleted
- if($_REQUEST['cancel'] ||
- $this->bo->delete_user($_REQUEST['deleteID'],
$_REQUEST['account'])
- )
- {
- $this->list_users();
- }
- elseif($_REQUEST['deleteAccount'])
- {
- //add errormessage
- $this->list_users();
- }
}
-
function group_manager($cd='',$account_id='')
{
if
($GLOBALS['phpgw']->acl->check('group_access',16,'admin'))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] admin/inc/class.uiaccounts.inc.php, 1.45,
nomail <=