* LDAP: 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:
Ralf Becker 2013-05-23 17:09:59 +00:00
parent 6066cbaad4
commit 9ecefc6b79

View File

@ -322,7 +322,7 @@ class accounts_ldap
$data['account_type'] = 'u';
// Check if an account already exists as system user, and if it does deny creation
if (!$GLOBALS['egw_info']['server']['ldap_allow_systemusernames'] &&
if (!$GLOBALS['egw_info']['server']['ldap_allow_systemusernames'] && !$old &&
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'));