WordPress.org

Ready to get started?Download WordPress

Forums

User Role Editor
Possible to use these new Roles.... (2 posts)

  1. bonelifer
    Member
    Posted 4 years ago #

    Is it possible to use these new roles in code. For instance I use a plugin that uses AUTH hooks to bridge my forum users to WP. When they login and the info matches a forum users credentials(ie username & password), it copies some info over and uses the code below to set their role. Would it be possible to use one of the new roles created with this plugin in place of 'default_role'.

    $user->set_role(get_option('default_role'));

    http://wordpress.org/extend/plugins/user-role-editor/

  2. Vladimir Garagulya
    Member
    Plugin Author

    Posted 4 years ago #

    I think - Yes, it is possible. New created role has no any differences in realization from any standard WP roles.
    Just try it, I hope something as:
    $user->set_role('new_created_role');
    will work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic