0

I am creating an user in liferay with the email address 'ABCD@domain.com' but when checked in the USER_ table in liferay database its store as 'abcd@domain.com'. I am using below API

UserLocalServiceUtil.addUser(creatorUserId,
                            companyId, autoPassword, password1, password2,
                            autoScreenName, screenName, usernameoremail, facebookId,
                            openId, Locale.ENGLISH, usernameoremail,
                            StringPool.BLANK, StringPool.BLANK, prefixId, suffixId,
                            male, birthdayMonth, birthdayDay, birthdayYear,
                            jobTitle, groupIds, organizationIds, roleIds,
                            userGroupIds, sendEmail, serviceContext);

at this point we are sure that email is in the form which we had sent.

Any idea why this is happenning? Any property in portal-ext which we can use to store it as is?

Seeker
  • 2,405
  • 5
  • 46
  • 80
  • Why is it a Problem? – Jens Aug 30 '16 at 07:55
  • Not sure this will help you, but still have a look : https://web.liferay.com/fr/community/wiki/-/wiki/Main/Developing+a+CAS/maximized#section-Developing+a+CAS-Sample+Authenticator+-+LiferayAuth+(Matching+the+modified+AuthPipeline) – Arnaud Aug 30 '16 at 08:06
  • @Jens it can be a problem because the part before the @ (local mailbox part) can be case sensitive (even though not sure there are any mail servers that do enforce it) – royB Aug 30 '16 at 08:08
  • Check https://stackoverflow.com/questions/9807909/are-email-addresses-case-sensitive - while case-sensitivity in the local-part seems to be legal, it's safe to assume that it is unused due to broken handling everywhere. – Olaf Kock Aug 30 '16 at 13:31

2 Answers2

1

As per the given post Are email address case sensitive even though as per the spec RFC 5321, section-2.3.11:Part of the email address before @ is supposed to be case-sensitive,but it is not handled that way by most of the mail service providers,and hence it stored in that fashion by liferay too.You can refer this link too. There is no property to handle email case sensivity.

Community
  • 1
  • 1
Shivam Aggarwal
  • 795
  • 1
  • 11
  • 30
1

Any email address you give, to create a user, it would be converted to lowercase in UserLocalServiceImpl.addUserWithWorkflow(). There isn't any configuration to change this behavior. Personally, I do not see the significant of lowercase here.