Fórumok

Overwriting update_password using application adapter hook

thumbnail
Srikanth Reddy Sanivarapu, módosítva 9 év-val korábban

Overwriting update_password using application adapter hook

Regular Member Bejegyzések: 203 Csatlakozás dátuma: 2008.11.15. Legújabb bejegyzések
Hi Team,

I have been trying to overwrite the update_password.jsp page (liferay-portal-6.1.20-ee-ga2\tomcat-7.0.27\webapps\ROOT\html\portal\update_password.jsp) using an application adapter hook. Portlet JSP files are overwritten with the application adapter hook but the update_password.jsp is not getting overwritten by this. Are there anyone who has come across this issue or do any one know the reason of not picking up the correct file here. Any suggestions are much appreciated. Thanks.

Regards,
Srik
thumbnail
Pankaj Kathiriya, módosítva 9 év-val korábban

RE: Overwriting update_password using application adapter hook

Liferay Master Bejegyzések: 722 Csatlakozás dátuma: 2010.08.05. Legújabb bejegyzések
I have tried overriding couple of files under \html\portal folder, but they are not getting overridden by adapter hook.

I feel as they are portal level jsps (Not specific to portlet and hence not specific to any Site), application adapter hook will not work for them.

Regards,
thumbnail
Manish Yadav, módosítva 8 év-val korábban

RE: Overwriting update_password using application adapter hook

Expert Bejegyzések: 493 Csatlakozás dátuma: 2012.05.26. Legújabb bejegyzések
Than how to do that???
I also have same requirement...I want to customize ui of html/portal/update_password.jsp for one site alone...
Application adapter is not working here...any hint how to achieve that
thumbnail
Olaf Kock, módosítva 8 év-val korábban

RE: Overwriting update_password using application adapter hook

Liferay Legend Bejegyzések: 6403 Csatlakozás dátuma: 2008.09.23. Legújabb bejegyzések
2 options quickly come to my mind.
  • link to your own implementation of an "update password" portlet
  • Globally override Liferay's JSP, but determine yourself if you're presenting the default or the modified UI to the user

There might be more, but start with these
thumbnail
David H Nebinger, módosítva 8 év-val korábban

RE: Overwriting update_password using application adapter hook

Liferay Legend Bejegyzések: 14916 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Yeah, I'd go w/ Olaf's second option. You can determine things in the JSP such as who the user is, what the current company/scope is, etc. Using that info you can include one set of elements or another.
thumbnail
Manish Yadav, módosítva 8 év-val korábban

RE: Overwriting update_password using application adapter hook

Expert Bejegyzések: 493 Csatlakozás dátuma: 2012.05.26. Legújabb bejegyzések
Many Thanks ...
I'm able to change UI according to userRole.... I have created UpdatePasswordAction Struts hook .But now i'm facing new issue, Could you please help me...
I have site with public page and private page...Public page is for login and default landing pages are privates pages.
I'm facing issue in redirection of user after reset password at first time login..

I have created UserPasswordAction strust action hook..

public String execute(StrutsAction originalStrutsAction, HttpServletRequest request, HttpServletResponse response) throws Exception {  
		

		 _log.info("Update Password Url Works Now");
	Ticket ticket = getTicket(request);
	
	try{
		if(Validator.isNotNull(ticket)){
    User user = UserLocalServiceUtil.getUser(ticket.getClassPK());
    if(checkUserGroup(user)&&checkUserRole(user)){
        request.setAttribute("IsValidLinkUser", Boolean.TRUE);
        _log.info("SampleLayoutStrutsAction.execute() - " + user.getEmailAddress()); 
    }
    }
		else{
			ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute(
					WebKeys.THEME_DISPLAY);
			if(Validator.isNotNull(themeDisplay)){
				 User user = themeDisplay.getUser();
				    if(checkUserGroup(user)&&checkUserRole(user)){
				        request.setAttribute("IsValidLinkUser", Boolean.TRUE);
				        _log.info("SampleLayoutStrutsAction.execute() - " + user.getEmailAddress()); 
				    }
				
			}
		}
  }
	
	catch(Exception e){
		_log.error(e);
	}


	return  originalStrutsAction.execute(request, response);
 

	}  



I want to change redirection to private pages after reset new password

for Eg:-

Reset Password Page :-
http://<abc>.com/web/sitename/

Should redirect to after reset password

http://<abc>.com/group/sitename/

can i modify below code in UpdatePasswordAction structs hook



ublic class UpdatePasswordAction extends Action {

	@Override
	public ActionForward execute(
			ActionMapping mapping, ActionForm form, HttpServletRequest request,
			HttpServletResponse response)
		throws Exception {

		ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute(
			WebKeys.THEME_DISPLAY);

		Ticket ticket = getTicket(request);

		

		try {
		[b]	updatePassword(request, response, themeDisplay, ticket);

			PortletURL portletURL = new PortletURLImpl(
				request, PortletKeys.LOGIN, themeDisplay.getPlid(),
				PortletRequest.RENDER_PHASE);

			response.sendRedirect(portletURL.toString());
[/b]
			return null;
		}


Stanimir Marinov, módosítva 5 év-val korábban

RE: Overwriting update_password using application adapter hook

New Member Bejegyzések: 3 Csatlakozás dátuma: 2019.02.27. Legújabb bejegyzések