From cb24a02efda92ecf9274bf40230dac488f9a0089 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 12 Aug 2018 09:41:36 +0200 Subject: [PATCH] set duplicate user name to warning --- lam/lib/modules/inetOrgPerson.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index 71600c2b..d456db4f 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -97,7 +97,7 @@ class inetOrgPerson extends baseModule implements passwordService { $this->messages['cn'][1] = array('ERROR', _('Account %s:') . ' inetOrgPerson_cn', _('Please enter a valid common name!')); $this->messages['uid'][0] = array('ERROR', _('User name'), _('User name contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and .-_ !')); $this->messages['uid'][1] = array('ERROR', _('Account %s:') . ' inetOrgPerson_userName', _('User name contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and .-_ !')); - $this->messages['uid'][3] = array('ERROR', _('Account %s:') . ' inetOrgPerson_userName', _('User name already exists!')); + $this->messages['uid'][3] = array('WARN', _('Account %s:') . ' inetOrgPerson_userName', _('User name already exists!')); $this->messages['manager'][0] = array('ERROR', _('Account %s:') . ' inetOrgPerson_manager', _('This is not a valid DN!')); $this->messages['file'][0] = array('ERROR', _('No file selected.')); $this->messages['file'][2] = array('ERROR', _('Unable to process this file.')); @@ -2272,7 +2272,7 @@ class inetOrgPerson extends baseModule implements passwordService { array_push($errMsg, array($i)); $errors[] = $errMsg; } - elseif (get_preg($rawAccounts[$i][$ids['inetOrgPerson_userName']], 'username')) { + if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_userName']], 'username')) { $partialAccounts[$i]['uid'] = $rawAccounts[$i][$ids['inetOrgPerson_userName']]; } else {