CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • CiviMember Roles Sync: bonus roles
Pages: [1]

Author Topic: CiviMember Roles Sync: bonus roles  (Read 1941 times)

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
CiviMember Roles Sync: bonus roles
December 16, 2010, 09:50:33 am
Hi all,

I really like the CiviMember Roles Sync module. It's a key element in our "Pay for Membership online -> Log in -> Instantly have access to specific Member only content" sequence. Users really like it. Who doesn't like to get something right away after you pay for it? Unfortunately, I've run into some unexpected behavior lately that has made me worry about security: access to our site. I'll try to detail it below. I'm hoping someone else may have seen this:

Our setup:
testuser in CiviCRM:
Membership record: (Leader Membership)

CiviMember Roles Sync Rules (sync upon Login/Logout):
Leader Membership -> Leader Role
Leader Applicant Membership -> Leader Applicant Role
Leader Applicant Sustaining Membership -> Leader Applicant Role
Online Basic Membership -> Member Role
Online Sustaining Membership -> Member Role
Basic Membership -> Member Role
Sustaining Membership -> Member Role

Issues:
1) upon Login my testuser did not acquire the Leader Role
2) my testuser did acquire a Bonus role (Member Role): even though the Membership you need to get the Member Role does not exist in the user's CiviCRM Membership record.

Removing the Bonus role -> Login/Logout -> no solution; I just couldn't get CiviMember Roles Sync module to give my test user Leader Role and the Bonus role always returned [if I use "sync when Cron is run" the Bonus role comes back when I run cron]. I then unlisted the CiviMember Roles Sync module -> uninstalled it -> recreated all the Membership Rules.

This solved problem 1): my testuser now does acquire Leader Role as it should.
But I still get a Bonus role -> a different one though: Leader Applicant Role this time. The CiviCRM Membership record hasn't changed. The only difference I can think of is that I've put the 7 Membership Rules back in a different order.

After reproducing this on a local development copy (same testuser; same issue) I then upgraded from 3.2 to 3.3 on my local install [and unlisted the CiviMember Roles Sync module -> uninstalled it -> recreated all the Membership Rules in the exact same order as on our live install].

This did not solve 2) either. In fact it made things more confusing as the same testuser in my 3.3 copy now somehow has two Bonus roles: Leader Applicant Role as well as Member Role. Removing the Bonus roles -> Login/Logout -> no solution;

All I can think of is that perhaps the Memberships my testuser has had at some point [Memberships for testing purposes (testing automated Membership renewal notices, testing PayPal setup, etc); Memberships that were deleted some time ago] are still -mistakenly- being used in the Sync? I understand that deleted Memberships can not result in "the taking away" of a Role. However, once the Role is removed manually -> Saved -> Login/Logout -> how can the Roles return if the Membership record that is specified in the Rules no longer exists?

Regards,

-- Karin

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviMember Roles Sync: bonus roles
December 16, 2010, 01:51:38 pm

Hey karin:

might be easiest to debug this on IRC. Can you get on the civicrm IRC channel. We'll probably ask you to edit a few files / truncate a few tables etc, so having ssh access to the server and some amount of php/mysql experience would be helpful

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Re: CiviMember Roles Sync: bonus roles
December 16, 2010, 02:54:02 pm
Thanks Lobo. It's a date. I can't get on the IRC until after 8pm MST tonight. I have some more time tomorrow (in between Christmas Concerts and plays from the kids) but lots of time on the weekend - if that works for your team? I'd like to troubleshoot this on my local Drupal 6.19/CiviCRM 3.3 install. I have all the access I need, am fairly comfortable with my MAMP setup and have some PHP background.

Thanks a bunch,

-- Karin

sushant

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 8
  • CiviCRM version: v3.2.x,v3.3.x v4.0.x, v4.x,trunk
  • CMS version: Drupal 6/7 ,joomla 1.5,1.6
  • MySQL version: 5.1.51
  • PHP version: 5.3.3
Re: CiviMember Roles Sync: bonus roles
December 21, 2010, 05:10:14 am
Hello Karin,

I suspect there are test memberships present for that particular user in  CiviCRM database,
and hence, though you have deleted role than also user get the role when you re-run synchronize user roles.

Could you please go to  "Memberships" -> "Find  Members" interface and search with  "Find Test Memberships?" = true.

In case you find any test membership for that user, lets drop all test memberships and run the synchronize user role again.

Let us know if it works for your installation.

Thanks,
Sushant
CiviCRM Priority Support
http://support.civigardens.com/
http://osseed.com

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Re: CiviMember Roles Sync: bonus roles
December 21, 2010, 10:45:01 am
Hi Sushant,

You're right! After deleting the test memberships for this testuser I am now getting the roles I should be getting on both 3.2 (production) as well as 3.3 (development).

What I still don't understand though is why on 3.2 my test user ended up acquiring only 1 of the 2 additional roles from test memberships (status: current) whereas on 3.3 my test user acquired both. The test memberships on both platforms were identical - I've not run any PayPal sandbox transactions for quite some time.

Thanks a bunch!

-- Karin


sushant

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 8
  • CiviCRM version: v3.2.x,v3.3.x v4.0.x, v4.x,trunk
  • CMS version: Drupal 6/7 ,joomla 1.5,1.6
  • MySQL version: 5.1.51
  • PHP version: 5.3.3
Re: CiviMember Roles Sync: bonus roles
December 21, 2010, 09:28:29 pm
Hi Karin,
This was bug in CiviCRM v3.2 we recently fixed this under http://issues.civicrm.org/jira/browse/CRM-4285.
This may help You.

Sushant.
CiviCRM Priority Support
http://support.civigardens.com/
http://osseed.com

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Re: CiviMember Roles Sync: bonus roles
December 22, 2010, 07:58:07 am
Thanks for your help Sushant. Things are making complete sense now. Great way to start our day here.

-- Karin

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • CiviMember Roles Sync: bonus roles

This forum was archived on 2017-11-26.