User Email Field in the Database

Where can I find the email assigned to a user (sys_email defined in the Server Administrator)? I need to generate a report on all users and assigned emails (and I dont want to go through server admin for each one).

It really depends on how you have notifications set up. If you’re using an LDAP attribute, you should talk to your LDAP admin. They may be able to run a quick report for you. If you’ve manually configured emails in the server admin for each user, you’ll have to go through the server admin to get them all. There is no reporting feature like what you’re requesting currently in the product.

What table are the emails stored in? I could run a SQL statement against the database.

To my knowledge, this information is not stored in the database.

This query will show you the user names and their email addresses. it’ll also show you which users do not have email addresses assigned to them.

select sub.NAME, v.VALUE email from PSX_SUBJECTS sub left join
((PSX_SUBJECT_ATTRIBUTES rel inner join PSX_ATTRIBUTE_NAMES n on
rel.ATTRIBUTEID = n.ID and n.name = 'sys_email') inner join
PSX_ATTRIBUTE_VALUES v on v.ATTRIBUTEID = n.ID) on sub.ID = rel.SUBJECTID
order by sub.NAME

This will only work if you have manually set a sys_email attribute for every user. If you’re using LDAP for email addresses, then you’ll have to go to the LDAP repository… I can’t help you there.

Also, I know the above code works in 6.5.2. I can’t guarantee that it works in any other version. Your mileage may vary.