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 Drupal Modules (Moderator: Donald Lobo) »
  • Group Roles Sync - not require user to log in
Pages: [1]

Author Topic: Group Roles Sync - not require user to log in  (Read 2042 times)

BusinessMediaCenter

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6 & 7
  • MySQL version: 5
  • PHP version: 5
Group Roles Sync - not require user to log in
January 13, 2011, 05:52:46 pm
Hello

I am using Drupal Group roles sync, and it works great.  However, the problem is that when a user is added to a new Drupal role, it is not until he/she logs in that they are added to the Civi Group.  I need for the user with the new role to be automatically added to the corresponding civi group.

How can this be accomplished?  Please let me know if you need more information


thanks!

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Group Roles Sync - not require user to log in
January 13, 2011, 06:05:21 pm
I believe synch works the other way - you put people in a Civicrm group - next time they login they get allocated the relevant Drupal role.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

BusinessMediaCenter

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6 & 7
  • MySQL version: 5
  • PHP version: 5
Re: Group Roles Sync - not require user to log in
January 13, 2011, 06:53:18 pm
Form your reply it seems that a possible solution is to first create a user, then instead of assigning a role, assign the group in civi.  I will try this out, thank you!

BusinessMediaCenter

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
  • CiviCRM version: 4.1.x
  • CMS version: Drupal 6 & 7
  • MySQL version: 5
  • PHP version: 5
Re: Group Roles Sync - not require user to log in
January 13, 2011, 07:01:41 pm
Yes, you are correct, it does work this way.  Final question- can I easily find or search for all OR customize the dashboard to show all contacts that are not currently in a group?

charleslcso

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
  • CiviCRM version: 3.2.5
  • CMS version: Drupal 6.19
  • MySQL version: 5.1.50
  • PHP version: 5.3.2
Re: Group Roles Sync - not require user to log in
January 17, 2011, 04:51:04 pm
Quote from: everything on January 13, 2011, 07:01:41 pm
Yes, you are correct, it does work this way.  Final question- can I easily find or search for all OR customize the dashboard to show all contacts that are not currently in a group?

Does it work for existing users? I have a bunch users in CiviCRM not assigned to any groups. I then create "Association Rule" in CiviGroup Roles Sync plugin, then assign a group to one of the existing users.

The user hasn't logged in yet, and there is no change to his Drupal role.

Then he logs in, and unfortunately there is still no change in his Drupal role....

Afterward I created a brand new user. This user is automatically placed in a CiviCRM group via profile, and this group is associated to a role in Drupal. His role remains empty before and after log in.

This module is enabled...

Anything else that I have to do? Do I have to install and run cron scripts? Which ones? The official doc for this plugin does not seem to exist yet. http://wiki.civicrm.org/confluence/display/CRMDOC32/CiviGroup+Roles+Sync

I'm on Drupal 6.19 and CiviCRM 3.2.5.
« Last Edit: January 17, 2011, 05:20:06 pm by charleslcso »

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Group Roles Sync - not require user to log in
May 24, 2012, 04:47:54 am
Quote from: petednz on January 13, 2011, 06:05:21 pm
I believe synch works the other way - you put people in a Civicrm group - next time they login they get allocated the relevant Drupal role.

It's evidently designed to sync in both directions: there's code for synchronising roles to groups, but it was broken, at least in Civi 4.1.2 / Drupal 7. I've made some changes which got the following scenarios working for me, which previously weren't:

1. Create user at /admin/people/create
2. Add role to user at /user/N/edit
3. Remove role from user at /user/N/edit

See http://issues.civicrm.org/jira/browse/CRM-10202

Cheers,

Dave J

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Group Roles Sync - not require user to log in
May 24, 2012, 12:18:53 pm
hmm- i was never aware that it was meant to be able to be a 2 way synch - look fwd to trying it out especially as we are probably needing to look at doing the same for the OG - Group synch module - you may have helped us along ;-)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

davyivins

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 2
    • PURCO SA
  • CiviCRM version: 4.5
  • CMS version: Drupal 6.33
  • MySQL version: 5.5.34
  • PHP version: 5.4.33
Re: Group Roles Sync - not require user to log in
May 25, 2012, 03:47:46 am
Hi Dave and others - any idea if your patch will work on Drupal 6  (with Civi 4.1.2)?
There are times I love technology...and then there are times I *love* technology :-)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Group Roles Sync - not require user to log in
May 25, 2012, 05:28:08 am
Quote from: davyivins on May 25, 2012, 03:47:46 am
Hi Dave and others - any idea if your patch will work on Drupal 6  (with Civi 4.1.2)?

Much of it wouldn't be relevant. The patch addresses 4 different types of problem in the code:
1. Civi API v3 requests / responses
2. Drupal 7 database layer
3. Changes to structure of Forms (Drupal 7 specific?)
4. General bugs - minor issues with debug messages IIRC.

So it may be that the API-related fixes are all you need for D6, plus I'd guess civicrm_group_roles_update_7400().

Ideally I would have done the non-D7-specific fixes first, created a patch for those, then another for D7. You know how these things go though, I was trying to get a small job done on a D7/Civi4.1 site and ended up spending longer tracking down why contacts weren't in the right groups & fixing that, than actually doing the job I was meant to be doing in the first place!

Dave J

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Group Roles Sync - not require user to log in

This forum was archived on 2017-11-26.