Forums

Auto change user roles (7 posts)

  1. mrwolf
    Member
    Posted 3 years ago #

    Hi all,

    I have a problem i'm yet to find a resolution for.

    I have a number of user roles defined on my blog. Some with more access to content and functions than others. So far i'm having to manage swtiching users between roles manually, which is both exceedingly tedious but also prone to all sorts of errors. Particularly as it is arranged so that users switch roles with reasonable frequency.

    What i'd love to be able to do is assign users to one role for a limited trial period and then automatically revert to another role once a date or condition is passed and vice versa. I'm using this so that users who build up credibilty with comments are then allowed to publish their own content for a limited period.

    Any help would be exceedinly appreciated.

    Thanks

  2. mrwolf
    Member
    Posted 3 years ago #

    anyone?

  3. mrwolf
    Member
    Posted 3 years ago #

    I guess not. :(

  4. banesto
    Member
    Posted 3 years ago #

    i'm really interested in this feature also.

  5. Roy
    Member
    Posted 3 years ago #

    I don't think there is such a thing. The Role Scoper plugin is rather new and still developing, maybe you could try to see if there are possibilities there.

  6. banesto
    Member
    Posted 3 years ago #

    i figured it out - actually it's quite simple:

    $user = new WP_User($userid);
    $user->set_role("subscriber");

    that's it - just write the appropriate plugin function to manage user roles.

  7. mrwolf
    Member
    Posted 3 years ago #

    sweet, thanks. i will give that a go

Topic Closed

This topic has been closed to new replies.

About this Topic