Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Subhasis Roy
How to create a post login hook in liferay 6.1?
July 3, 2012 11:24 PM
Answer

Subhasis Roy

Rank: Regular Member

Posts: 157

Join Date: January 19, 2012

Recent Posts

Hi,

In liferay 6.0 we used to define hook inside liferay-hook.xml using <event> tag.

But I found that its not working for liferay 6.1.

liferay 6.0 code:

<hook>
<event>
<event-class>com.test.sample.MyAction</event-class>
<event-type>login.events.post</event-type>
</event>
</hook>



Can anyone please tell me how and where to define a post login hook(login.events.post) in liferay 6.1 version.
Jitendra Rajput
RE: How to create a post login hook in liferay 6.1?
July 4, 2012 12:05 AM
Answer

Jitendra Rajput

Rank: Liferay Master

Posts: 575

Join Date: January 7, 2011

Recent Posts

In 6.1 you can do this with by over riding portal.properties ..
1<portal-properties>portal.properties</portal-properties>


Specify above property in your liferay-hook.xml
and place portal.properties inside your hook and place property related to your event .

1login.events.post=com.test.sample.MyAction
Subhasis Roy
RE: How to create a post login hook in liferay 6.1?
July 5, 2012 12:11 AM
Answer

Subhasis Roy

Rank: Regular Member

Posts: 157

Join Date: January 19, 2012

Recent Posts

thanks.

But this is not working when I have integrated with CAS.

I logged in using CAS and expects my post login hook to interfere after i logged in, but hook is not working int his case.

For simple liferay login(withou CAS) , hook is working.

Can any one have any idea about this?
Petr Vašek
RE: How to create a post login hook in liferay 6.1?
July 5, 2012 1:11 AM
Answer

Petr Vašek

Rank: Junior Member

Posts: 55

Join Date: June 26, 2012

Recent Posts

Hi Roy, You can use EXT plugin, i think it is very easy way to solution.

http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/developing-an-ext-plugin

Petr
Miguel Ángel Júlvez
RE: How to create a post login hook in liferay 6.1?
September 19, 2012 7:22 AM
Answer

Miguel Ángel Júlvez

Rank: Junior Member

Posts: 56

Join Date: March 29, 2011

Recent Posts

Hi Subhass,

did you get a solution?

Regards

Subhasis Roy:
thanks.

But this is not working when I have integrated with CAS.

I logged in using CAS and expects my post login hook to interfere after i logged in, but hook is not working int his case.

For simple liferay login(withou CAS) , hook is working.

Can any one have any idea about this?
Subhasis Roy
RE: How to create a post login hook in liferay 6.1?
September 20, 2012 9:28 PM
Answer

Subhasis Roy

Rank: Regular Member

Posts: 157

Join Date: January 19, 2012

Recent Posts

yes. it worked.
Bryan Kim
RE: How to create a post login hook in liferay 6.1?
February 26, 2013 3:40 PM
Answer

Bryan Kim

Rank: New Member

Posts: 3

Join Date: January 17, 2013

Recent Posts

What was the solution for this?