The MU forums have moved to WordPress.org

Troubleshooting user deletion and transfer of SimplePress forum posts (5 posts)

  1. agreda
    Member
    Posted 14 years ago #

    Hello, we're trying to figure out why forum posts of deleted users aren't getting transferred as they should. We have SimplePress 4.1.2 running on the main blog only. I have tried deleting users from both Site Admin -> Users and Blog 1 -> Authors & Users. Both actions have the same results...

    Upon deletion, the user gets removed from: WordPress Blog Authors & Users, WMPU Site Users, and SPF Admin Manage Users tab, but they remain in the actual forums (along with their posts), and they get removed from all User Groups and their rank gets changed to Admin.

    FYI: Deleted member data remains in row within wp_1_sfmembers, but no such row for same member remains in wp_users after deletion.

    In regular WP, tests show that deleting a user in the WP Users panel does successfully remove them from SPF, and turns that user into a 'Guest' and does remove all traces of their membership.

    I've got this SimplePress support forum topic going, and this from the SPF development team ...

    This uses the WP action hook 'delete_user' and it correctly fires and does it's stuff. That's not really helpful but I have to wonder, as before, whether MU has the same hook and action...

    Thanks in advance for any input!

  2. agreda
    Member
    Posted 14 years ago #

    Clarification of the question from the SPF crew:

    I would be interested to know if the hook in MU is exactly the same as standard WP. I.e., does it fire at the same point in the process for example.

  3. agreda
    Member
    Posted 14 years ago #

    Can anyone point me to where I might research how the delete_user hook functions in WPMU and whether it is the same as in WordPress, or how it might differ?

    Thank you.

  4. DeannaS
    Member
    Posted 14 years ago #

    In WPMU, that particular hook is in this file:
    http://svn.automattic.com/wordpress-mu/tags/2.8.6/wp-includes/user.php

    The rub is that there's also a wpmu_delete_user function. That's the one that actually get used and the hook in that one isn't delete_user it's wpmu_delete_user.

    So, in the plugin if you want it work for both, you'd probably need to do:

    if (is_function('wpmu_delete_user') {
      // attach your function to the wpmu_delete_user hook here
    }
    else {
     // attach your function to the wp_delete hook here
    }
  5. agreda
    Member
    Posted 14 years ago #

    Thank you!!!

About this Topic