completly fix #921476 (Creating new account failes) The system now alerts that a group already exists with the userloginid which was attemted to create

This commit is contained in:
Pim Snel 2004-04-21 21:40:13 +00:00
parent 4c4913282f
commit e20c2e2815

View File

@ -739,10 +739,17 @@
if ($_userData['old_loginid'] != $_userData['account_lid'])
{
if ($GLOBALS['phpgw']->accounts->exists($_userData['account_lid']))
if ($GLOBALS['phpgw']->accounts->exists($_userData['account_lid']))
{
$error[$totalerrors] = lang('That loginid has already been taken');
$totalerrors++;
if ($GLOBALS['phpgw']->accounts->exists($_userData['account_lid']) && $GLOBALS['phpgw']->accounts->get_type($_userData['account_lid'])=='g')
{
$error[$totalerrors] = lang('There already is a group with this name. Userid\'s can not have the same name as a groupid');
}
else
{
$error[$totalerrors] = lang('That loginid has already been taken');
}
$totalerrors++;
}
}