On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hello!
    I've created a custom table with custom fields. If I delete a WebUser in WebloginPE, then it will delete only the line in the WebUser table. The custom table remains the line. How can I delete the corresponding row in the custom table automatically?
    • You should be able to create a new plugin that fires on the "OnWebDeleteUser" event.

      You'll have access to the following variables in your plugin:
      $internalKey == users id
      $username == users username

      plugin code:

      $table ='YOUR_TABLE_NAME';
      $delete = $modx->db->delete($tablename, 'username="'.$username.'"');

      modify the WHERE section above ('username="username"') to fit your custom table.
        http://frsbuilders.net (under construction) forum for evolution
      • Thank you!
        i have found another thread:
        I will test both!
        • Hello, witch one works? i have the same problem?
          Thank you!