forked from extern/egroupware
2 more cases for r42550: only check for matching system users, if a new account get added, as existing accounts can be reported - depending on configuration - as system users too
This commit is contained in:
parent
a7fc441423
commit
30b3f407d2
@ -67,7 +67,7 @@ class admin_cmd_edit_user extends admin_cmd_change_pw
|
|||||||
}
|
}
|
||||||
// Check if an account already exists as system user, and if it does deny creation
|
// Check if an account already exists as system user, and if it does deny creation
|
||||||
if ($GLOBALS['egw_info']['server']['account_repository'] == 'ldap' &&
|
if ($GLOBALS['egw_info']['server']['account_repository'] == 'ldap' &&
|
||||||
!$GLOBALS['egw_info']['server']['ldap_allow_systemusernames'] &&
|
!$GLOBALS['egw_info']['server']['ldap_allow_systemusernames'] && !$data['account_id'] &&
|
||||||
function_exists('posix_getpwnam') && posix_getpwnam($data['account_lid']))
|
function_exists('posix_getpwnam') && posix_getpwnam($data['account_lid']))
|
||||||
{
|
{
|
||||||
throw new egw_exception_wrong_userinput(lang('There already is a system-user with this name. User\'s should not have the same name as a systemuser'),99);
|
throw new egw_exception_wrong_userinput(lang('There already is a system-user with this name. User\'s should not have the same name as a systemuser'),99);
|
||||||
|
@ -355,7 +355,7 @@
|
|||||||
// Check if an account already exists as system user, and if it does deny creation
|
// Check if an account already exists as system user, and if it does deny creation
|
||||||
// (increase the totalerrors counter and the message thereof)
|
// (increase the totalerrors counter and the message thereof)
|
||||||
if ($GLOBALS['egw_info']['server']['account_repository'] == 'ldap' &&
|
if ($GLOBALS['egw_info']['server']['account_repository'] == 'ldap' &&
|
||||||
!$GLOBALS['egw_info']['server']['ldap_allow_systemusernames'] &&
|
!$GLOBALS['egw_info']['server']['ldap_allow_systemusernames'] && !$_userData['account_id'] &&
|
||||||
function_exists('posix_getpwnam') && posix_getpwnam($_userData['account_lid']))
|
function_exists('posix_getpwnam') && posix_getpwnam($_userData['account_lid']))
|
||||||
{
|
{
|
||||||
$error[$totalerrors] = lang('There already is a system-user with this name. User\'s should not have the same name as a systemuser');
|
$error[$totalerrors] = lang('There already is a system-user with this name. User\'s should not have the same name as a systemuser');
|
||||||
|
Loading…
Reference in New Issue
Block a user