We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4966
    • 143 Posts
    I have a plugin to delete the row in the web_user_attributes_extended table. It works from the front when a user deletes their profile it does not work from manager. I get a error message. I think that internalkey does not exit at this point. Here is the code -

    echo $internalKey;
    echo $tablename ='modx_web_user_attributes_extended';
    //$id = $modx->db->escape($id);
    $modx->db->delete($tablename, "internalKey = '.$internalKey.'");
    //$exit();

    I also tried adding code to the class file to delete the record but it just seems to be ignored.

    $web_user_attributes = $modx->getFullTableName('web_user_attributes');
    $web_user_attributes_extended = $modx->getFullTableName('web_user_attributes_extended');
    $web_groups = $modx->getFullTableName('web_groups');
    $active_users = $modx->getFullTableName('active_users');

    $deleteUser = $modx->db->query("DELETE FROM ".$web_users." WHERE `id`='".$internalKey."'");
    $deleteAttributes = $modx->db->query("DELETE FROM ".$web_user_attributes." WHERE `internalKey`='".$internalKey."'");
    $deleteExtended = $modx->db->query("DELETE FROM ".$web_user_attributes_extended." WHERE `internalKey`='".$internalKey."'"); //LINUS

    I need one of these to work. I've spent the better part of three days working on something that should have been very simple.

    I guess I need to also ask if Evo is still being maintained? I've not wanted to move to the replacement product.
      • 4966
      • 143 Posts
      Anyone?