Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter aoverbury

    (@aoverbury)

    Thanks, bcworkz.

    I know what I’m doing isn’t the best way to do it, but it’s honestly the best I could come up with. The full situation is this:

    We have a number of download packages that we’re making available via WordPress Download Manager. It uses role-based authorisation to enable/disable the ability for a given user to download the files in a package.

    With this, though, I can make it work now. I’ve already got some patches to give to the developers of the plugin because they don’t handle roles as well as they could.

    Thread Starter aoverbury

    (@aoverbury)

    Yes, they are. An example CSV line used as the source is:

    [email protected],99,privilege-group-1,privilege-group-2

    As I noted, the call to WPUser->add_role() succeeds, and wp_usermeta is updated to add the role name to wp_capabilities. It just doesn’t seem to do anything else, so when my template checks to see if the user has a particular role applied, the answer is always ‘no’.

Viewing 2 replies - 1 through 2 (of 2 total)