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:32:57 +00:00
parent 0e3f456fe1
commit b6f0321b52

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'])