Alex Earl commented on New Feature JENKINS-16861

You need to get a property from the user object. This is how it is done internally in the email-ext plugin.

public static String getUserConfiguredEmail(User user) {
    String addr = null;
    if(user != null) {
        Mailer.UserProperty mailProperty = user.getProperty(Mailer.UserProperty.class);
        if (mailProperty != null) {
            addr = mailProperty.getAddress();
        }
    }
    return addr;
}


Also, just as an FYI, when using groovy, for getters and setters you don't need the get/set; for example: claim.claimedByName is the same as claim.getClaimedByName()

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to