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
      $timestamp


      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.
        xforum
        http://frsbuilders.net (under construction) forum for evolution
      • Thank you!
        i have found another thread:
        http://www.modxcms.de/forum/comments.php?DiscussionID=860
        I will test both!
        • Hello, witch one works? i have the same problem?
          Thank you!
            --
            ysanmiguel.com