The MU forums have moved to WordPress.org

Unsubscribe, remove user from blog button (5 posts)

  1. jmunn
    Member
    Posted 14 years ago #

    I just installed the add users sidebar widget plugin which I'm pretty psyched about actually. However it doesn't provide an "unsubscribe" button if you are already subscribed to a blog. Does anyone know what the code would look like that could do this. Can I remove_user_from_blog and keep his or her content up and author details still up?
    Thanks in advance.

  2. jmunn
    Member
    Posted 14 years ago #

    And actually, power tools can't execute remove_user_from_blog(44); on all blogs. Any ideas why that would be or how I should better write it? It seems to do what I want when I "Run the code once" on the current blog. It makes it so the user has no role for the blog, but doesn't delete their old posts or anything. I was trying "delete user" from /users.php and that seems to remove their author page and posts? Am I right or have I been staring at my puter for too long?

  3. andrea_r
    Moderator
    Posted 14 years ago #

    "Can I remove_user_from_blog and keep his or her content up and author details still up?"

    Default WP behaviour says no.

  4. jmunn
    Member
    Posted 14 years ago #

    Well I'll have to play with it again today with a fresh set of peepers. When running it through power tools it was making it so the user had no role on the blog but their author page and posts would stay, which is what I am hoping for.
    Thanks Andrea.

  5. andrea_r
    Moderator
    Posted 14 years ago #

    Yep, cuz they are still a user on the system and still exist. :) ie; not deleted.

About this Topic