• Resolved leaklords

    (@kwark)


    Hi,

    I’m doing a opensource plugin for Public Management Livestreams compatible with own3d.tv, justin.tv, twitch.tv, livestream.com

    I have some problem with my code with a request to delete one new special role.

    I’m blocked with get_users and make a filter on get_users, with something like this

    http://pastebin.com/M0tMw3Nc

    the role is deleted from administration correctly (in the default list wordpress. Users switch to the role “subscriber” but, when i go to the default wordpress profil field, i have a new part named “additional capacity” (or something like that in french) with the key of the latest role that I just erase (and this value made a bug).

    Have you an idea to delete completly the role_to_delete for each user ? Any idea for only those users of this latest role return correctly in “members” ? (without losing their greater role on the current_site)

    The objective is each user don’t lose its greater role and return in this greater role.

    Actually, also the admin goes to members without //filter current admin
    wp_get_current_user();

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter leaklords

    (@kwark)

    I think the problem come from class objet in capabilities.php and another function get_users

    get_users work with the key of the role and all class function set_role, etc…work with the name of the role.

    not practical for standard bloggers who use wordpress, when these users is not a professional php coder.

    Or just for create and manipulate some basic new roles with php. Until now, when i code theme or plugin free for wordpress, i manipulate the key, not only the value on get_{…} set_{…} etc….

    and i understand, anything, in php class … (I love wordpress because it was easy accessible …but now here is complicated)

    Thread Starter leaklords

    (@kwark)

    //Now remove this WP role…
    $wp_roles = new WP_Roles();
    $result = $wp_roles->remove_role(”.$livetv_new_role_to_delete.”);

    with this change, also don’t work

    img http://img15.imageshack.us/slideshow/webplayer.php?id=livetvcreationroles.png

    [No bumping, thank you.]

    Thread Starter leaklords

    (@kwark)

    Hi,

    Not a bump.

    the last pastbin was moderated on pastebin (becose the copyright and gnu gpl dont remove (ctrl-c, …))

    I add in my new post only the new pastbin, that you have moderate and erased (for nothing so…)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘get_users, filter, switch users from the current role to delete – to another one’ is closed to new replies.