留言板

override liferay email verification code

thumbnail
devaraj s,修改在11 年前。

override liferay email verification code

Regular Member 帖子: 228 加入日期: 12-5-21 最近的帖子
Hi,
while user creation liferay will send a email notification, with email verification code. Verification code is painful so i need to send my custom verification code to user email address.

I dont know from where liferay genertaing email-verification-code., please can one help me where i can control this verification code.
thumbnail
Mika Koivisto,修改在11 年前。

RE: override liferay email verification code

Liferay Legend 帖子: 1519 加入日期: 06-8-7 最近的帖子
The email address verification is sent from UserLocalServiceImpl.sendEmailAddressVerification() method.
thumbnail
Hitoshi Ozawa,修改在11 年前。

RE: override liferay email verification code

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
I t hink you're actually looking for the class below which is used to generate the keys. It's also in portal-service instead of portal-impl
portal-service\src\com\liferay\portal\kernel\uuid\PortalUUIDUtil.java
thumbnail
devaraj s,修改在11 年前。

RE: override liferay email verification code

Regular Member 帖子: 228 加入日期: 12-5-21 最近的帖子
yes,
according to Mika Koivisto its generating verification key from userlocalserviceImpl.sendEmailAddressVerification,

Ticket ticket = ticketLocalService.addTicket(
user.getCompanyId(), User.class.getName(), user.getUserId(),
TicketConstants.TYPE_EMAIL_ADDRESS, emailAddress, null,
serviceContext);


actually from above code its generating verification key like, 62e8a564-d164-4eb8-b950-88e014d77f49

my exact requirement is, I need to reduce the length of verification key, I mean i need only 4 character it should generate. how i can achieve this one?
thumbnail
Hitoshi Ozawa,修改在11 年前。

RE: override liferay email verification code

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
Check the code to find which class the key is being generated!
thumbnail
Mika Koivisto,修改在11 年前。

RE: override liferay email verification code

Liferay Legend 帖子: 1519 加入日期: 06-8-7 最近的帖子
Ah, I understood that you want to know where the email is generated. The key is generated in TicketLocalServiceImpl. When changing it you should bear in mind that the key must be unique.