Fórum
How to disable users account configuration
Pierre-Olivier Kaplan, modificado 9 Anos atrás.
How to disable users account configuration
New Member Postagens: 2 Data de Entrada: 01/10/14 Postagens Recentes
Hello dear developpers,
I'm trying to prevent my portal users from accessing the account configuration. The link is given in the default sign-in portlet :
Is there a way to hide this link ? Or to disable the user account configuration ?
Thank you, best regards !
I'm trying to prevent my portal users from accessing the account configuration. The link is given in the default sign-in portlet :
Is there a way to hide this link ? Or to disable the user account configuration ?
Thank you, best regards !
Hetal Jayesh Prajapati, modificado 9 Anos atrás.
RE: How to disable users account configuration
New Member Postagens: 12 Data de Entrada: 15/09/08 Postagens Recentes
Hi Pierre-Olivier Kapla,
You can do that with the use of hook. In hook you need to override login.jsp from login portlet.
Regards,
Hetal Prajapati
You can do that with the use of hook. In hook you need to override login.jsp from login portlet.
Regards,
Hetal Prajapati
Jitendra Rajput, modificado 9 Anos atrás.
RE: How to disable users account configuration
Liferay Master Postagens: 875 Data de Entrada: 07/01/11 Postagens Recentes
Create hook and override login.jsp of Sign in portlet (/html/portlet/login/login.jsp) and override below snippet.
<c:when test="<%= themeDisplay.isSignedIn() %>">
<%
String signedInAs = HtmlUtil.escape(user.getFullName());
if (themeDisplay.isShowMyAccountIcon() && (themeDisplay.getURLMyAccount() != null)) {
String myAccountURL = String.valueOf(themeDisplay.getURLMyAccount());
if (PropsValues.DOCKBAR_ADMINISTRATIVE_LINKS_SHOW_IN_POP_UP) {
signedInAs = "<a href="\"javascript:Liferay.Util.openWindow({dialog:" {destroyonhide: true}, title: '" + languageutil.get(pagecontext, "my-account") "', uri: htmlutil.escape(myaccounturl) "'});\">" + signedInAs + "</a>";
}
else {
myAccountURL = HttpUtil.setParameter(myAccountURL, "controlPanelCategory", PortletCategoryKeys.MY);
signedInAs = "<a href="\""" + htmlutil.escape(myaccounturl) "\">" + signedInAs + "</a>";
}
}
%>
<%= LanguageUtil.format(pageContext, "you-are-signed-in-as-x", signedInAs, false) %>
</c:when>
Pierre-Olivier Kaplan, modificado 9 Anos atrás.
RE: How to disable users account configuration
New Member Postagens: 2 Data de Entrada: 01/10/14 Postagens Recentes
I went on that file, I found the code, and I removed this line :
<%= LanguageUtil.format(pageContext, "you-are-signed-in-as-x", signedInAs, false) %>
And it works ! Thanks both of you.
Best regards
<%= LanguageUtil.format(pageContext, "you-are-signed-in-as-x", signedInAs, false) %>
And it works ! Thanks both of you.
Best regards