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 (Moderator: Dave Greenberg) »
  • CiviRoles Sync Issue
Pages: [1]

Author Topic: CiviRoles Sync Issue  (Read 1126 times)

klkosi

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 2
  • CiviCRM version: 3.2.2
  • CMS version: Drupal 6.19
CiviRoles Sync Issue
September 28, 2010, 04:44:00 am
Dear all,

I am really sorry for all of the tech support questions, but I am unable to find a solution to this issue.

I have both CiviGroup Roles Sync and CiviMember Roles Sync enabled in my Drupal modules.  I also have the necessary groups and membership types set up in CiviCRM and the necessary Drupal roles set up as well.  Via CiviGroup and CiviMember Roles sync and linked up the CiviCRM data to the appropriate Drupal roles, so...

CiviCRM Members Contact group -> Drupal role "member"
CiviCRM General Members (in CiviMember) -> Drupal role "member"

CiviCRM Supports Contact group -> Drupal role "supporter"
CiviCRM Supporter Members (in CiviMember) -> Drupal role "supporter"

I've also set the sync to happen whenever a user logs in or out, so when someone signs up as a member and is added to the Members CiviGroup and to the General Member in CiviMember, they should automatically be assigned to the Drupal "member" user role and its appropriate role permissions.  However, I created a test contact and I see that while everything is working on the CiviCRM end (meaning that the contact is being added to the right CiviGroup and CiviMember membership type), the Drupal role is not automatically being applied to their username.  I tried logging in and out of the test account a few times, but the Drupal role is still not automatically syncing.

Any ideas about what settings I've missed or why the sync isn't happening? 

Thank you!

FrTommy

  • I post frequently
  • ***
  • Posts: 273
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.32
  • PHP version: 5.3
Re: CiviRoles Sync Issue
September 28, 2010, 05:15:59 am
This sounds similar to what I was experiencing with the CiviRoles sync. Whenever a user registered the Civi profile added the contact to a group and my understanding was that the CiviRoles Sync would then take care of adding the drupal user to the associated drupal role. However it did not happen this way. The contact was added to the civi group but was immediately removed from the group because civi role sync did not find the contact in the drupal role.

I utilized the Rules module in Drupal to add a user to a drupal role when they registered and this fixed things.

I'm thinking that maybe the CiviRoles Sync is only one way. Not sure if that's how the CiviMember sync works or not.

klkosi

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 2
  • CiviCRM version: 3.2.2
  • CMS version: Drupal 6.19
Re: CiviRoles Sync Issue
September 30, 2010, 10:33:31 am
I actually figured out what was causing my issue, but regarding your problem, I think the CiviRoles Sync works best with Drupal roles if the Drupal user name and CiviCRM profile/membership are created at the same time. 

By this, I mean that you use a CiviContribute form, mandate Drupal user registration and set up CiviMember and CiviContact sync under Drupal Site Configuration so that the membership/contact associated with the profile used in the CiviContribute page is always associated with a particular Drupal role.  Then, you configure the Sync settings so that the sync is done every time users log into their accounts.  Done this way, the CiviRoles sync is working very well for me.

However, when I tried to go back to create a user name and password for someone who already exists in the CiviCRM system, the role association is dropped every time I test log in with that user name and password.  I've been googling around though and I seem to have found some old CiviCRM forum posts about Creating a Drupal User for Every CiviCRM records or something of that nature, which may explain how to retroactively create a user name and password for a CiviCRM person.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • CiviRoles Sync Issue

This forum was archived on 2017-11-26.