From 30b3f407d290812b20a36ce0b5983a3db0dd5953 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 27 May 2013 14:30:22 +0000 Subject: [PATCH] 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 --- admin/inc/class.admin_cmd_edit_user.inc.php | 2 +- admin/inc/class.boaccounts.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/inc/class.admin_cmd_edit_user.inc.php b/admin/inc/class.admin_cmd_edit_user.inc.php index e7c75dd081..917291e6ef 100644 --- a/admin/inc/class.admin_cmd_edit_user.inc.php +++ b/admin/inc/class.admin_cmd_edit_user.inc.php @@ -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 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'])) { 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); diff --git a/admin/inc/class.boaccounts.inc.php b/admin/inc/class.boaccounts.inc.php index ebb289f544..e112688c7a 100755 --- a/admin/inc/class.boaccounts.inc.php +++ b/admin/inc/class.boaccounts.inc.php @@ -355,7 +355,7 @@ // Check if an account already exists as system user, and if it does deny creation // (increase the totalerrors counter and the message thereof) 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'])) { $error[$totalerrors] = lang('There already is a system-user with this name. User\'s should not have the same name as a systemuser');