@PublicApi
public interface MessageUserProcessor
Modifier and Type | Method and Description |
---|---|
ApplicationUser |
findUserByEmail(String emailAddress)
Returns the first User found with an email address that equals the given emailAddress case insensitively.
|
ApplicationUser |
findUserByUsername(String username)
Finds the user with the given username or returns null if there is no such User.
|
ApplicationUser |
getAuthorFromSender(javax.mail.Message message)
For each sender of the given message in turn, look up a User first with a case-insensitively equal email address,
and failing that, with a username equal to the email address.
|
@Nullable ApplicationUser getAuthorFromSender(javax.mail.Message message) throws javax.mail.MessagingException
JIRA wants to do this because when we create users in email handlers, we set email and username equal. If a user subsequently changes their email address, we must not assume they don't exist and create them with the email address as the username.
message
- the message from which to get the User.javax.mail.MessagingException
- if there's strife getting the message sender.@Nullable ApplicationUser findUserByUsername(String username)
username
- the username.@Nullable ApplicationUser findUserByEmail(String emailAddress)
emailAddress
- the email address to match.Copyright © 2002-2018 Atlassian. All Rights Reserved.