Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
devaraj s
override liferay email verification code
February 21, 2013 10:11 PM
Answer

devaraj s

Rank: Regular Member

Posts: 206

Join Date: May 21, 2012

Recent Posts

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.
Mika Koivisto
RE: override liferay email verification code
February 25, 2013 10:53 AM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1498

Join Date: August 7, 2006

Recent Posts

The email address verification is sent from UserLocalServiceImpl.sendEmailAddressVerification() method.
Hitoshi Ozawa
RE: override liferay email verification code
February 25, 2013 2:13 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

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
devaraj s
RE: override liferay email verification code
February 25, 2013 11:44 PM
Answer

devaraj s

Rank: Regular Member

Posts: 206

Join Date: May 21, 2012

Recent Posts

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?
Hitoshi Ozawa
RE: override liferay email verification code
February 26, 2013 4:44 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Check the code to find which class the key is being generated!
Mika Koivisto
RE: override liferay email verification code
February 26, 2013 9:09 AM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1498

Join Date: August 7, 2006

Recent Posts

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.