b.borrowernumber as objectGUID,
surname as displayName,
a.attribute as pager,
- email as mail,
+ case
+ when email regexp '@ffzg.hr' then email
+ when emailpro regexp '@ffzg.hr' then emailpro
+ else
+ trim(userid)
+ end as mail,
categorycode as memberOf,
categorycode as ou,
categorycode as department,