Cannot Request Users With long userid After Patching to DE-93


  • We use this code to secure our API calls in our customization:
    (request variable is an HttpServletRequest object from @Context annotation)

    long userId = GetterUtil.getLong(request.getRemoteUser()); 
    user = UserLocalServiceUtil.getUser(userId);
  • However, after patching to DE-93 from DE-59 this code only calls default Liferay user. Because of this, users can't log in after applying the patch.


  • DXP 7.0


  • In this case, it is resolved by using the PortalUtil class PortalUtil.getUser(HttpServletRequest request) Liferay API

Additional Information


0 人中有 0 人觉得有帮助