Feature #520 Invite Friends widget to make user entered email address lowercase

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/widgets/invite-friends-widget@117769 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2015-09-02 09:13:07 +00:00
parent 79a622a7f4
commit 96574b1491
1 changed files with 3 additions and 2 deletions

View File

@ -46,6 +46,7 @@ public class InviteServiceImpl extends RemoteServiceServlet implements InviteSer
public InviteOperationResult sendInvite(String name, String lastName, String email) throws IllegalArgumentException {
ASLSession aslSession = getASLSession();
String lowercaseEmail = email.toLowerCase();
String portalUrl = null;
String vreDescription = null;
long organizationId = getASLSession().getGroupId();
@ -54,11 +55,11 @@ public class InviteServiceImpl extends RemoteServiceServlet implements InviteSer
vreDescription = OrganizationLocalServiceUtil.getOrganization(organizationId).getComments();
} catch (Exception e1) {
e1.printStackTrace();
_log.warn("While trying to send email for invitation to " + email);
_log.warn("While trying to send email for invitation to " + lowercaseEmail);
return null;
}
String portalSenderEmail = PortalContext.getConfiguration().getSenderEmail();
return InvitesManager.getInstance().sendInvite(aslSession, portalSenderEmail, portalUrl, name, lastName, email, vreDescription);
return InvitesManager.getInstance().sendInvite(aslSession, portalSenderEmail, portalUrl, name, lastName, lowercaseEmail, vreDescription);
}