Support » Plugin: Affiliates Manager » User role

  • Resolved CaptainMorgan

    (@davehealey)


    Hi,

    It seems that when adding a new user the role is set to affiliate but when adding an affiliate account for an existing user the additional affiliate role isn’t added to their profile so I’m unable to customize the website based on the affiliate role of the user.

    Edit: never mind, just realized I can use the additional capabilities.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Can you expand on your solution? I also have the same issue 🙂

    If you click to edit a user and scroll right down to the bottom of the edit page you’ll see a section called Additional Capabilities. You can access these capabilities for each user through php in pretty much the same way you can access user roles.

    Here’s the function I’m using.

    function get_current_user_capabilities() {
    	
    	if( is_user_logged_in() ) {
    		$user = wp_get_current_user();
    		$caps = ( array ) $user->allcaps;
    		return $caps; //Returns an array of all individual and role based capabilities
    	} else {
    		return array();
    	}	
    }
    Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    The plugin doesn’t require the “affiliate” role on an affiliate in order to function properly. It’s just for display purpose so an administrator can quickly identify the affiliates from the Users menu. However, forcing it to apply a role to an existing account might cause issues with other e-commerce/membership plugins that rely on it.

    The above comment is for your information.

    It seems that when adding a new user the role is set to affiliate but when adding an affiliate account for an existing user the additional affiliate role isn’t added to their profile so I’m unable to customize the website based on the affiliate role of the user.

    Please check the following documentation.

    Thank you

    Thank you for the feedback!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.