If the settings have been changed after data has been created then you really ought to run the mapping task at the bottom of that admin screen which will rebuild the mapping based on the current roles to user group relationships. That will ensure things are correct and will soon show up if there remains a problem.
Support Forum
If the settings have been changed after data has been created then you really ought to run the mapping task at the bottom of that admin screen which will rebuild the mapping based on the current roles to user group relationships. That will ensure things are correct and will soon show up if there remains a problem.
OK
but before I do that, what I’m trying to understand is: When there is a change to a user’s additional user role within MP/WP (which there will be If/When their subscription expires, which will remove additional roles) Will SP automatically update their forum access based on mapping OR do I have to do this manually?
DD
IF the plugin you are using abides by the WP rules, protocols and APIs then the answer is yes. Now most plugins do – but we still come across the odd one very now and then that does not.
Hi,
ok so MP runs a daily cron job which clears out additional user roles from expired subscriptions. This explains why I was seeing a delay in the updating of user role profiles.
So now I still have users with no additional user role but who still have forum access based on the user role > user group mapping (I’ve not yet run the manual mapping refresh in SP).
MP say that they conform to WP rules etc and I have found their application to be robust and reliable on live sites, so I feel a but stuck between two places to turn to get this resolved.
Any suggestions gratefully received.
Thanks
DD
Am still somewhat confused which, partly, is a matter of terminology. If we are talkimng about a users WordPress ‘role’ being changed then surely the plugin should be calling the ‘set_user_role’ action hook… (https://codex.wordpress.org/Plugin_API/Action_Reference/set_user_role).
Or am I still misunderstanding?
Thanks for the codex link.
The way that I understand that they manage roles with memberships is that they add an additional user role to the users default role when a subscription is purchased for a membership. When a subscription expires, the additional user role is removed.
So in the case that I’m testing, user DogsBronze has a default role ‘Guest’. When a subscription is added to a Bronze Membership (as specified in MP) for that user, the additional user role ‘Bronze Member’ is added. When the subscription expires (and the cron job is run) the additional user role ‘Bronze Member’ is removed. At no time, that I can see, is the default user role changed.
SP picks up the additional user role when a subscription is added to that user, but not when it is removed.
The codex link you sent looks like it should be triggered when default role is changed, But I’ll get it checked over at MP.
Thanks
DD
Does it get removed when the membership plugin cron task is run?
We will need to check we are doing things properly but we have had SP users who make good use of the WP role system before without, as far as I know, any issues arising. Seems like the above question should answer that.
Yes, the additional user role gets removed when the cron job is run, but it sounds like the action hook you mention does not trigger an event that Sp can pick up on (as the default role is unaffected throughout?).
DD
I was specifically meaning – after the nightly cron job is run that removed a row from a user – does this correct the user group assignment within SP. If it does – then we are doing what we can our end to respond to the change.
Just for information and clarification… I’ve just added a subscription to this member and the additional user role, Silver Member has been added. This has been picked up by SP and access has been granted to the appropriate forum
‘I was specifically meaning – after the nightly cron job is run that removed a row from a user – does this correct the user group assignment within SP. If it does – then we are doing what we can our end to respond to the change.’
Unfortunately not, and this is the problem that I’ve been describing.
A MP subscription expires and after the cron job, their additional user role is removed from the user record. However, SP continues to grant access to the forum that the subscription authorised. The user is still listed within the SP Forum>User Groups
I don’t know if MP is not triggering an action or if SP is not picking it up.
So best way forward is for you to check with them that the necessary action hook is getting called on both create and remove and I will get the code looked at this end to ensure we are picking up everything we should when that hook is actioned.


