0
votes

I am using Liferay 7.3.2. I have want to redirect the user after login. I have created a public page and define following property in portal-ext.properties file.

default.landing.page.path=/web/${liferay:screenName}/login

How can I access the user screen name in a friendly URL while creating a public page?

I tried as follows but not working: /liferay-screenname/login

I want screen name in the URL because only authenticated users would access the URL.

1

1 Answers

1
votes

I am not familiar with these variables in properties, but a possible solution is to do this programmatically and write an OSGi LifecycleAction component for the login.events.post key. In your processLifecycleEvent operation, you can generate a path based on screenName of the logged-in user and set this as session LAST_PATH.

There are some stackoverlow topics about this, that might help here: last-path-redirection-in-custom-login-post-action-in-liferay-7