legacy-knowledge-base
公開されました Jul. 2, 2025

DE-93 へのパッチ適用後、長いユーザー ID を持つユーザーを要求できない

written-by

Madeleine Clay

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • このコードを使用して、カスタマイズで API 呼び出しを保護します。
    (request variable is an HttpServletRequest object from @Context annotation)

    long userId = GetterUtil.getLong(request.getRemoteUser());
    user = UserLocalServiceUtil.getUser(userId);
  • ただし、DE-59 から DE-93 にパッチを適用した後、このコードはデフォルトの Liferay ユーザーのみを呼び出します。 このため、パッチを適用した後、ユーザーはログインできません。

Environment

  • DXP 7.0

解決策

  • この場合、 を使用して解決されます PortalUtil クラス PortalUtil.getUser(HttpServletRequest request) Liferay API

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base