How to allow users to Delete Themselves From Multisite? (4 posts)

  1. massimigliano
    Posted 2 years ago #

    Sometimes a user will want to completely delete himself and own blog from my Network, any plugins to do this?

    I set All my users to Authors in my Network.....I tried "Delete Me" and "Never Let Me Go" plugins but don't work

  2. You can delete them, the users cannot delete themselves. Most people don't want to allow users to do that, since ... well users are silly.

    http://wordpress.org/extend/plugins/user-self-delete/ comes to mind. You would have to extrapolate and expand it though.

  3. massimigliano
    Posted 2 years ago #

    if ($_POST['delete_me'] == "yes") {
          mysql_query("DELETE FROM wp_users WHERE id='".$_POST['user_ID']."'");
          echo '<script type="text/javascript">window.location = "'.get_option('siteurl') . '/wp-login.php"</script>';

    This is stupid as $_POST['user_ID'] is never sanitized and if I pass 1 OR 1 as the ID, the plugin will happily delete ALL users from the database.

  4. So fix it :) Since you're going to have to improve it anyway to make it clean up the sites, you can do that while you're in there.

Topic Closed

This topic has been closed to new replies.

About this Topic