mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
update
This commit is contained in:
parent
0349874425
commit
9e5ae9f83b
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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'),
|
||||
|
@ -140,15 +140,15 @@
|
||||
<!-- {rows} -->
|
||||
</td>
|
||||
<td valign="top">
|
||||
<xsl:variable name="edit_url"><xsl:value-of select="edit_url"/></xsl:variable>
|
||||
<form method="POST" action="{$edit_url}">
|
||||
<table border="0" width="100%">
|
||||
<xsl:variable name="edit_url"><xsl:value-of select="edit_url"/></xsl:variable>
|
||||
<xsl:variable name="account_id" select="account_id"/>
|
||||
<xsl:variable name="account_lid" select="account_lid"/>
|
||||
<xsl:variable name="account_firstname" select="account_firstname"/>
|
||||
<xsl:variable name="account_lastname" select="account_lastname"/>
|
||||
<xsl:variable name="account_passwd" select="account_passwd"/>
|
||||
<xsl:variable name="account_passwd_2" select="account_passwd_2"/>
|
||||
<form action="{$edit_url}" method="POST">
|
||||
<input type="hidden" name="values[account_id]" value="{$account_id}"/>
|
||||
<tr class="row_on">
|
||||
<td width="25%"><xsl:value-of select="lang_lid"/></td>
|
||||
@ -221,24 +221,18 @@
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<tr height="50" valign="bottom">
|
||||
<td colspan="3">
|
||||
<xsl:variable name="lang_save"><xsl:value-of select="lang_save"/></xsl:variable>
|
||||
<input type="submit" name="values[save]" value="{$lang_save}"/>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
<tr>
|
||||
<xsl:variable name="cancel_url"><xsl:value-of select="cancel_url"/></xsl:variable>
|
||||
<xsl:variable name="lang_done"><xsl:value-of select="lang_cancel"/></xsl:variable>
|
||||
<form method="POST" action="{$cancel_url}">
|
||||
<td>
|
||||
<input type="submit" name="cancel" value="{$lang_cancel}"/>
|
||||
<td colspan="3" align="right">
|
||||
<xsl:variable name="lang_cancel"><xsl:value-of select="lang_cancel"/></xsl:variable>
|
||||
<input type="submit" name="values[cancel]" value="{$lang_cancel}"/>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user