mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
use a prefix for user accounts
can be set in setup
This commit is contained in:
parent
69e0eea014
commit
d96c9afac2
@ -304,12 +304,18 @@
|
||||
ExecMethod('admin.uiaccounts.list_users');
|
||||
return False;
|
||||
}
|
||||
|
||||
$accountPrefix = '';
|
||||
if(isset($GLOBALS['phpgw_info']['server']['account_prefix']))
|
||||
{
|
||||
$accountPrefix = $GLOBALS['phpgw_info']['server']['account_prefix'];
|
||||
}
|
||||
|
||||
if ($_POST['submit'])
|
||||
{
|
||||
$userData = array(
|
||||
'account_type' => 'u',
|
||||
'account_lid' => $_POST['account_lid'],
|
||||
'account_lid' => $accountPrefix.$_POST['account_lid'],
|
||||
'account_firstname' => $_POST['account_firstname'],
|
||||
'account_lastname' => $_POST['account_lastname'],
|
||||
'account_passwd' => $_POST['account_passwd'],
|
||||
@ -568,11 +574,17 @@
|
||||
ExecMethod('admin.uiaccounts.list_users');
|
||||
return False;
|
||||
}
|
||||
|
||||
$accountPrefix = '';
|
||||
if(isset($GLOBALS['phpgw_info']['server']['account_prefix']))
|
||||
{
|
||||
$accountPrefix = $GLOBALS['phpgw_info']['server']['account_prefix'];
|
||||
}
|
||||
|
||||
if ($_POST['submit'])
|
||||
{
|
||||
$userData = array(
|
||||
'account_lid' => $_POST['account_lid'],
|
||||
'account_lid' => $accountPrefix.$_POST['account_lid'],
|
||||
'firstname' => $_POST['account_firstname'],
|
||||
'lastname' => $_POST['account_lastname'],
|
||||
'account_passwd' => $_POST['account_passwd'],
|
||||
|
@ -1068,10 +1068,19 @@
|
||||
);
|
||||
$t->set_var($var);
|
||||
*/
|
||||
$accountPrefix = '';
|
||||
if(isset($GLOBALS['phpgw_info']['server']['account_prefix']))
|
||||
{
|
||||
$accountPrefix = $GLOBALS['phpgw_info']['server']['account_prefix'];
|
||||
if (preg_match ("/^$accountPrefix(.*)/i", $userData['account_lid'], $matches))
|
||||
{
|
||||
$userData['account_lid'] = $matches[1];
|
||||
}
|
||||
}
|
||||
$var = Array(
|
||||
'input_expires' => $jscal->input('expires',$userData['expires']<0?'':($userData['expires']?$userData['expires']:time()+(60*60*24*7))),
|
||||
'lang_never' => lang('Never'),
|
||||
'account_lid' => '<input name="account_lid" value="' . $userData['account_lid'] . '">',
|
||||
'account_lid' => $accountPrefix.'<input name="account_lid" value="' . $userData['account_lid'] . '">',
|
||||
'lang_homedir' => $lang_homedir,
|
||||
'lang_shell' => $lang_shell,
|
||||
'homedirectory' => $homedirectory,
|
||||
|
Loading…
Reference in New Issue
Block a user