留言板

postmaster email validation fail in 6.0.6

thumbnail
Fabio Foglia,修改在11 年前。

postmaster email validation fail in 6.0.6

Junior Member 帖子: 61 加入日期: 11-9-2 最近的帖子
Hello,

if I try to create a user with email startong with postmaster@... the operation fails !!!

The problem came out on:

UserLocalServiceUtil.addUser

Caused by: com.liferay.portal.UserEmailAddressException at com.liferay.portal.service.impl.UserLocalServiceImpl.validateEmailAddress(UserLocalServiceImpl.java:3143) at com.liferay.portal.service.impl.UserLocalServiceImpl.validate(UserLocalServiceImpl.java:3084)
at com.liferay.portal.service.impl.UserLocalServiceImpl.addUser(UserLocalServiceImpl.java:344)

It seems to be fixed there:

http://issues.liferay.com/browse/LEP-4083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel#issue-tabs

but the problem is already present in 6.0.6.

How can I resolve or skip the validation?
thumbnail
Samuel Kong,修改在11 年前。

RE: postmaster email validation fail in 6.0.6

Liferay Legend 帖子: 1902 加入日期: 08-3-10 最近的帖子
postmaster@ is a reserved email address and cannot be used.

LEP-4083 fixes Validator.isEmailAddress(). It's not directly related to your issue.
thumbnail
Fabio Foglia,修改在11 年前。

[RESOLVED] RE: postmaster email validation fail in 6.0.6

Junior Member 帖子: 61 加入日期: 11-9-2 最近的帖子
Hello,

thanks for reply.

Next question is:

So If I have a customer that wants to create a user with postmaster account, the only possible solution is to abandon Liferay for another product?

It don't seems a good solution. The right seems to leave this setting to be configurable and not HARD CODED !!!

The funny stuff is that "com.liferay.portal.kernel.util.Validator.isEmailAddress" go over well and the operation fails on "UserLocalServiceUtil.addUser".

Well. Following a work-aroud found:

1) Create the accound with xpostmaster@domain.com (instead of postmaster@domain.com), so you can create the user with "UserLocalServiceUtil.addUser"
2) Use "UserLocalServiceUtil.updateUser" to fix the email address to the right one

Best regards

Fabio
thumbnail
Samuel Kong,修改在11 年前。

RE: postmaster email validation fail in 6.0.6

Liferay Legend 帖子: 1902 加入日期: 08-3-10 最近的帖子