prevent using the numeric value of a group or user twice, by checking if it already exists for both sides

This commit is contained in:
Klaus Leithoff 2009-07-17 10:30:49 +00:00
parent 6a12b7c448
commit 47de1aa9f9

View File

@ -1081,7 +1081,7 @@ class accounts_ldap
{
$account_id = (int) $GLOBALS['egw']->common->next_id($type,$min,$max);
}
while ($account_id && $this->frontend->exists($sign * $account_id)); // check need to include the sign!
while ($account_id && ($this->frontend->exists($sign * $account_id) || $this->frontend->exists(-1 * $sign * $account_id))); // check need to include the sign!
if (!$account_id || $this->frontend->config['account_max_id'] &&
$account_id > $this->frontend->config['account_max_id'])