forked from extern/egroupware
use a prefix for user accounts
can be set in setup
This commit is contained in:
parent
69e0eea014
commit
d96c9afac2
@ -305,11 +305,17 @@
|
|||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$accountPrefix = '';
|
||||||
|
if(isset($GLOBALS['phpgw_info']['server']['account_prefix']))
|
||||||
|
{
|
||||||
|
$accountPrefix = $GLOBALS['phpgw_info']['server']['account_prefix'];
|
||||||
|
}
|
||||||
|
|
||||||
if ($_POST['submit'])
|
if ($_POST['submit'])
|
||||||
{
|
{
|
||||||
$userData = array(
|
$userData = array(
|
||||||
'account_type' => 'u',
|
'account_type' => 'u',
|
||||||
'account_lid' => $_POST['account_lid'],
|
'account_lid' => $accountPrefix.$_POST['account_lid'],
|
||||||
'account_firstname' => $_POST['account_firstname'],
|
'account_firstname' => $_POST['account_firstname'],
|
||||||
'account_lastname' => $_POST['account_lastname'],
|
'account_lastname' => $_POST['account_lastname'],
|
||||||
'account_passwd' => $_POST['account_passwd'],
|
'account_passwd' => $_POST['account_passwd'],
|
||||||
@ -569,10 +575,16 @@
|
|||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$accountPrefix = '';
|
||||||
|
if(isset($GLOBALS['phpgw_info']['server']['account_prefix']))
|
||||||
|
{
|
||||||
|
$accountPrefix = $GLOBALS['phpgw_info']['server']['account_prefix'];
|
||||||
|
}
|
||||||
|
|
||||||
if ($_POST['submit'])
|
if ($_POST['submit'])
|
||||||
{
|
{
|
||||||
$userData = array(
|
$userData = array(
|
||||||
'account_lid' => $_POST['account_lid'],
|
'account_lid' => $accountPrefix.$_POST['account_lid'],
|
||||||
'firstname' => $_POST['account_firstname'],
|
'firstname' => $_POST['account_firstname'],
|
||||||
'lastname' => $_POST['account_lastname'],
|
'lastname' => $_POST['account_lastname'],
|
||||||
'account_passwd' => $_POST['account_passwd'],
|
'account_passwd' => $_POST['account_passwd'],
|
||||||
|
@ -1068,10 +1068,19 @@
|
|||||||
);
|
);
|
||||||
$t->set_var($var);
|
$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(
|
$var = Array(
|
||||||
'input_expires' => $jscal->input('expires',$userData['expires']<0?'':($userData['expires']?$userData['expires']:time()+(60*60*24*7))),
|
'input_expires' => $jscal->input('expires',$userData['expires']<0?'':($userData['expires']?$userData['expires']:time()+(60*60*24*7))),
|
||||||
'lang_never' => lang('Never'),
|
'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_homedir' => $lang_homedir,
|
||||||
'lang_shell' => $lang_shell,
|
'lang_shell' => $lang_shell,
|
||||||
'homedirectory' => $homedirectory,
|
'homedirectory' => $homedirectory,
|
||||||
|
Loading…
Reference in New Issue
Block a user