Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Subhasis Roy
How to create a post login hook in liferay 6.1?
May 21, 2014 4:37 AM
Answer

Subhasis Roy

Rank: Regular Member

Posts: 234

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: 709

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: 234

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?
Karel Teniska
RE: How to create a post login hook in liferay 6.1?
July 5, 2012 1:11 AM
Answer

Karel Teniska

Rank: Junior Member

Posts: 68

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: 234

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?
Subhasis Roy
RE: How to create a post login hook in liferay 6.1?
March 19, 2014 4:56 AM
Answer

Subhasis Roy

Rank: Regular Member

Posts: 234

Join Date: January 19, 2012

Recent Posts

For JSP hook we can follow as mentioned below.

Refer to attached sample JSP hooks
Attachment

Attachments: LiferryHook.jpg (86.9k), Test-hook.zip (10.8k)
Hu Jun
RE: How to create a post login hook in liferay 6.1?
March 18, 2014 7:03 PM
Answer

Hu Jun

Rank: New Member

Posts: 1

Join Date: March 18, 2014

Recent Posts

can you tell me how to solution for it? thank you very much!