Skip to content
Snippets Groups Projects
Commit 27fead1c authored by srosse's avatar srosse
Browse files

OO-1858: check if the email address is available before sending the mail notification

parent 50ab0c7e
No related branches found
No related tags found
No related merge requests found
...@@ -119,6 +119,12 @@ public class RepositoryMailing { ...@@ -119,6 +119,12 @@ public class RepositoryMailing {
return; return;
} }
String email = identity.getUser().getProperty(UserConstants.EMAIL, null);
String emailAlt = identity.getUser().getProperty(UserConstants.INSTITUTIONALEMAIL, null);
if(!StringHelper.containsNonWhitespace(email) && !StringHelper.containsNonWhitespace(emailAlt)) {
return;
}
if(mailing == null) { if(mailing == null) {
BaseSecurity securityManager = CoreSpringFactory.getImpl(BaseSecurity.class); BaseSecurity securityManager = CoreSpringFactory.getImpl(BaseSecurity.class);
RepositoryModule repositoryModule = CoreSpringFactory.getImpl(RepositoryModule.class); RepositoryModule repositoryModule = CoreSpringFactory.getImpl(RepositoryModule.class);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment