// Try to obtain email to add. This is only allowed if logged on
// user is SERVER ADMINISTRATOR
try {
// check if user account exists
UserAccount useracct =
user.getServer().getAdministration().findUserAccount(user.getID());
if (useracct == null) {
LOG.warn("User account " + user.getID() + " not found for email address.");
} else {
mod.emailAddress = useracct.getEmailAddress();
}
} catch (ServerException sx) {
// Logged on user does not have permission to get user's email.
// Return the modifying user's name instead. Then use the
// email.properties file to map the name to an email address