Shamsul Bahrin:
String screenName = UserLocalServiceUtil.getUser(PortalUtil.getUserId(request)).getScreenName();
String path = "/web/" + screenName + "/home";
This path does not send user to his/her private page. The other issue that I have with screenName is that in most cases, the screenName from User is different than the actual user's friendlyURL that I believe comes from group table.
I have updated the following settings in portal-ext.properties and user is redirected to the private page. Default values are set to "true" and I set them to "false".
#
# Set this to true if users are forwarded to the last visited path upon
# successful login. If set to false, users will be forwarded to their
# default layout page.
#
auth.forward.by.last.path=false
#
# The login page reads a redirect by a parameter named "redirect". If this
# property is set to true, then users will be redirected to the given
# redirect path upon successful login. If the user does not have permission
# to view that page, then the rule set by the property
# "auth.forward.by.last.path" will apply.
#
# You can set the redirect manually from another application, by appending
# the "redirect" parameter in a url that looks like this:
# /c/portal/login?redirect=%2Fgroup%2Femployees%2Fcalendar. This url will
# redirect the user to the path "/group/employees/calendar" upon successful
# login.
#
auth.forward.by.redirect=false
Bitte melden Sie sich an, um diesen Inhalt als unangebracht zu kennzeichnen.