Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Compatibility with Membership plugins
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 9, 2018 - 6:34 am

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/Pl....._user_role).

Or am I still misunderstanding?

andy-signature.png
YELLOW
SWORDFISH
Avatar
dogsday
Member
Free Members
sp_UserOfflineSmall Offline
Aug 9, 2018 - 9:15 am

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

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 9, 2018 - 9:36 am

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
dogsday
Member
Free Members
sp_UserOfflineSmall Offline
Aug 9, 2018 - 9:41 am

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

Avatar
dogsday
Member
Free Members
sp_UserOfflineSmall Offline
Aug 9, 2018 - 9:45 am

oops, sorry, please ignore attachments

DD

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 9, 2018 - 9:49 am

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
dogsday
Member
Free Members
sp_UserOfflineSmall Offline
Aug 9, 2018 - 9:54 am

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

Roles-default-additional.jpgImage Enlarger

Avatar
dogsday
Member
Free Members
sp_UserOfflineSmall Offline
Aug 9, 2018 - 10:01 am

'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.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 9, 2018 - 10:14 am

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
dogsday
Member
Free Members
sp_UserOfflineSmall Offline
Aug 9, 2018 - 10:21 am

Agree.

I'll be back (with renewed subscription)

Thanks for your help

DD

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 618
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10126
Posts: 79622