From 9e5ae9f83ba9447cb05d7a5b37d168c785b45fad Mon Sep 17 00:00:00 2001 From: ceb Date: Sun, 27 Apr 2003 20:28:34 +0000 Subject: [PATCH] update --- admin/inc/class.boaccounts.inc.php | 4 +--- admin/inc/class.uiaccounts.inc.php | 38 +++++++++++++++++------------- admin/templates/default/users.xsl | 22 +++++++---------- 3 files changed, 30 insertions(+), 34 deletions(-) diff --git a/admin/inc/class.boaccounts.inc.php b/admin/inc/class.boaccounts.inc.php index 8cb133d479..47ad819bd2 100755 --- a/admin/inc/class.boaccounts.inc.php +++ b/admin/inc/class.boaccounts.inc.php @@ -295,11 +295,10 @@ $GLOBALS['phpgw']->db->unlock(); } - function add_user() + function add_user($values) { if ($GLOBALS['phpgw']->acl->check('account_access',4,'admin')) { - ExecMethod('admin.uiaccounts.list_users'); return False; } @@ -519,7 +518,6 @@ { if ($GLOBALS['phpgw']->acl->check('account_access',16,'admin')) { - ExecMethod('admin.uiaccounts.list_users'); return False; } diff --git a/admin/inc/class.uiaccounts.inc.php b/admin/inc/class.uiaccounts.inc.php index 1d0a8f4b17..6579f97911 100755 --- a/admin/inc/class.uiaccounts.inc.php +++ b/admin/inc/class.uiaccounts.inc.php @@ -471,22 +471,17 @@ function edit_user() { - $cd = get_var('cd',array('GET')); - $account_id = get_var('account_id',array('GET','POST')); - $values = get_var('values',array('POST')); - $account_groups = get_var('account_groups',array('POST')); - $account_permissions = get_var('account_permissions',array('POST')); + $cd = get_var('cd',array('GET')); + $account_id = get_var('account_id',array('GET','POST')); + $values = get_var('values',array('POST')); + $account_groups = get_var('account_groups',array('POST')); + $account_apps = get_var('account_apps',array('POST')); - if (!$account_id && $GLOBALS['phpgw']->acl->check('account_access',4,'admin')) - { - $this->list_user(); - return False; - } + _debug_array($values); - if ($account_id && $GLOBALS['phpgw']->acl->check('account_access',16,'admin')) + if ($values['cancel'] || (!$account_id && $GLOBALS['phpgw']->acl->check('account_access',4,'admin')) || ($account_id && $GLOBALS['phpgw']->acl->check('account_access',16,'admin'))) { - $this->list_user(); - return False; + $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiaccounts.list_users'); } /*$cdid = $cd; @@ -541,6 +536,16 @@ $GLOBALS['phpgw']->xslttpl->add_file(array('app_data','users')); $GLOBALS['phpgw_info']['flags']['app_header'] = lang('administration') . ': ' . ($account_id?lang('edit user account'):lang('add user account')); + if ($account_id) + { + $user_info = Array + ( + 'account_name' => $GLOBALS['phpgw']->accounts->id2name($account_id), + 'account_user' => $this->bo->load_group_users($account_id), + 'account_apps' => $this->bo->load_group_apps($account_id) + ); + } + if (is_array($_userData)) { $userData = Array(); @@ -682,17 +687,16 @@ ); } - $page_params['menuaction'] = 'admin.boaccounts.edit_user'; - if($_account_id) + $page_params['menuaction'] = 'admin.uiaccounts.edit_user'; + if($account_id) { - $page_params['account_id'] = $_account_id; + $page_params['account_id'] = $account_id; $page_params['old_loginid'] = rawurlencode($userData['account_lid']); } $data = array ( 'edit_url' => $GLOBALS['phpgw']->link('/index.php',$page_params), - 'cancel_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_user'), 'lang_lid' => lang('loginid'), 'lang_account_active' => lang('account active'), 'lang_password' => lang('password'), diff --git a/admin/templates/default/users.xsl b/admin/templates/default/users.xsl index 3ae5d622fb..87cb3137c0 100644 --- a/admin/templates/default/users.xsl +++ b/admin/templates/default/users.xsl @@ -140,15 +140,15 @@ + +
- - @@ -221,24 +221,18 @@
- - - + + - -
- - - -
- - + + + -
+