• Resolved m4group

    (@m4group)


    I have added multiple roles to a user.

    When user Submits a Job Posting (protected by role=job_posting), the role is being removed.

    When user Submits a Directory Listing (protected by role=new_posting), the role is being removed.

    I have gone into back end admin, re-added the additional role, retested the Submission and again, the role is being removed automatically.

    Is this a bug or something that cannot be accomplished with multiple roles?

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Your Job theme or plugin may use WP_User->set_role() which replaces all roles granted to user with a new one. If it does exactly this, you can add custom action ‘set_user_role’ to fix the issue. It takes 3 input parameters:
    $user_id – ID of editing user
    $role – new role
    $old_roles – array of old roles.

Viewing 1 replies (of 1 total)
  • The topic ‘Roles being automatically removed’ is closed to new replies.