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

LDAPサーバーで無効化/削除されたユーザーをLiferayから削除する方法

written-by

Alexandra Rujzam

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

問題

LDAPサーバーにユーザーが登録されなくなると、認証に失敗してログインできなくなりますが、「コントロールパネル」-「> ユーザー」にデッドユーザーエントリーが残ります。

Environment

  • Liferay DXP 7.0+

解決策

ユーザーの無効化をポータル/データベースと同期させる方法があります。 ステータス がLDAPユーザー属性に正しくマッピングされている場合、次回インポート/ログイン時にポータルはそのユーザーを非アクティブにし、コントロールパネル -> ユーザーセクションにそのアカウントが表示されないようにします。
以下の手順をご覧ください:
  1. ユーザーをインポートし、そのユーザーが正常にサインインできることを確認し、「コントロールパネル」-「> ユーザー」セクションに表示される。
  2. データベースの user_ テーブルをチェックし、カラム Status の値が '0' であることを確認します。これは 'Active' を意味します。
  3. LDAPサーバー(Apache Directoryなど)に Status の標準属性がない場合、ランダムな属性(例: employeeNumber)を選択し、その値を「Inactive」を意味する「5」に設定します。
  4. Instance Settings -> Edit LDAP Server で、この employeeNumber 属性を Status にマッピングします(User のマッピング可能フィールドの中で、「Job Title」のすぐ後にリストされています)。
  5. LDAPインポートをきっかけに、LDAPユーザーでログインしてみて、そのユーザーがログインできないことを確認してください。
  6. データベースの user_ テーブルを再度確認し、ユーザーステータスが「5」であることを保証します。
  7. コントロールパネル」-「> ユーザー」で、そのユーザーが表示されなくなったことを確認します。

残念ながら、Liferay API(groovyスクリプト)を使う以外、データベースからユーザーを完全に削除するアウトオブボックスな方法はありません:
https://help.liferay.com/hc/en-us/articles/360017895672-Using-Liferay-s-Script-Engine
did-this-article-resolve-your-issue

legacy-knowledge-base