fix kurzbz check

This commit is contained in:
Werner Masik
2023-11-28 12:18:04 +01:00
parent b80df4f0eb
commit a613abea39
@@ -144,10 +144,15 @@ class Mitarbeiter_model extends DB_Model
* Checks if alias exists
* @param $kurzbz
*/
public function kurzbzExists($kurzbz)
public function kurzbzExists($kurzbz, $uid=null)
{
$this->addSelect('1');
$result = $this->loadWhere(array('kurzbz' => $kurzbz));
$where = array('kurzbz' => $kurzbz);
if ($uid != null)
{
$where['mitarbeiter_uid<>'] = $uid;
}
$result = $this->loadWhere($where);
if (isSuccess($result))
{