legacy-knowledge-base
公開されました Sep. 10, 2025

ユーザー アカウントの作成者を取得する方法はありますか

written-by

Aaron Wang

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

問題

  • ユーザー アカウントの作成者を取得する方法または SQL ステートメントはありますか?

Environment

  • Liferay DXP 7.0

解決策

ユーザー アカウントの作成者を取得するには、2 つの方法があります。

  • ユーザー アカウントの作成者は API で取得できます。
      • UserLocalService* (パーミッションをチェックしない) または UserService* (パーミッションをチェックする) クラスを使用して、 User オブジェクト/秒を取得します。
      • User オブジェクトを取得したら、次のように呼び出すことができます。
        • getCreateDate(): ユーザーの作成日を取得します。
        • getContact(): は、ユーザー Contact レコードを取得します。 このレコードを使用すると、次のように呼び出すことができます。
          • getUserId(): ユーザーの作成者の userId を取得します。
          • getUserName(): userName of ユーザーの作成者を取得します。
  • ユーザー アカウントの作成者は、データベースのテーブル User_ および Contact_ の同じ名前のフィールドでも利用できます。
did-this-article-resolve-your-issue

legacy-knowledge-base