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 Profiles (Moderator: Dave Greenberg) »
  • Associating Individual and Organization profiles with a drupal user registration
Pages: [1]

Author Topic: Associating Individual and Organization profiles with a drupal user registration  (Read 4966 times)

GregoryHeller

  • I post occasionally
  • **
  • Posts: 73
  • Karma: 3
Associating Individual and Organization profiles with a drupal user registration
March 12, 2009, 11:44:36 am
I'm trying to figure out a way to collect organizational contact information when a drupal user registers.

The scenario is that when a drupal user registers they will fill out information about themselves: name, address, and other contact information

They will also provide employer information and employer contact information. Ideally this employer (organization) information will be associated with them vial the "current employer" field, and also available as organization contact information.

I have created a profile for the individual information, and a second profile for the organization information.  I have ticked the option for both profiles to be used on user registration AND on user edit.  The organization profile does not show up on user registration and on user edit a tab for this profile does display but NO fields display.

I thought for a minute, and this makes sense technically because organizations are not directly associated with a drupal user.  From a functionality standpoint this does not seem to make sense though since there are many use cases where an individual drupal user is associated with one ore more organizations and can provide some information about them. 

I know there has been some discussion about this (i saw here http://forum.civicrm.org/index.php/topic,6407.0.html and elsewhere) and that it is a tricky issue because you do not want to allow users to edit the contact information for organizations they are not authorized to or authoritative about.

What are the potential solutions to this problem? where a user is providing information about their employer?
the only one that i can think of is to have them fill out current employer and then work address location information, and then manually fill in the address info for the employer organization records.  This does not solve some of my other requirements including some custom fields on organizations.

-gregory

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: Associating Individual and Organization profiles with a drupal user registration
March 12, 2009, 12:03:59 pm
I think we are looking at a similar problem though in our case the Org has to be a Member - so the first step in our case is a Membership Join page that includes signing up an Individual, who uses the Current Employer field to then create that Relationship.

We can then give them rights via that Relationships to 'edit and update info' about the Organisation - then they get access to the Orgs Dashboard and core 'contact details'.

If they were also able to access this Custom Data that you are associating with the Org, would that suffice?

Of course this doesn't resolve the first issue you have of doing this via registration rather than membership. Sounds like if the Registration process permitted an Individual to register an Org with the permission to 'edit and update info' that would get us as far as the above? And then the issue is how to add the access to the Custom Data?

(Not sure I am making myself clear - recovering from a near-traumatic mac upgrade done by professionals!)



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

dharmatech

  • I post frequently
  • ***
  • Posts: 280
  • Karma: 53
    • dharmatech.org
Re: Associating Individual and Organization profiles with a drupal user registration
March 12, 2009, 02:03:57 pm
Hey Gregory. We encountered a similar situation with a client, Native Americans in Philanthropy. 
Like peterd mentioned, this all may be irrelevant to you because NAP's registration process involves a contribution. But I'm posting this here in case it helps.

What we came up with (which is not pretty) is represented here: http://nativephilanthropy.org/civicrm/profile/edit?reset=1&gid=6

When an individual becomes a member on behalf of an organization (link above), they first encounter a profile with fields for themselves as the employee and an option to create a drupal user account. Upon submission of this page, they are redirected to a second profile (http://nativephilanthropy.org/civicrm/profile/create?reset=1&gid=7) with organizational fields (this creates the organizational record and obviously has no drupal account option). Then this second profile takes them to a contribution page allowing them to donate on behalf of their organization.

We initially included the "current employer" field in the first individual profile (step 1 link above) but realized that an organizational profile doesn't perform (well or at all) duplicate matching so it was creating an organization record in step 1 and a duplicate in step 2. Does that make sense?

Keeping the current employer field out of step 1 turned out to be ok because when someone contributes on behalf of an organization, it creates a relationship to the organization with the permission to edit the org. And when you donate on behalf of an org it does perform good duplicate checking. 

So to summarize, step 1 creates the individual with the drupal user account, step 2 creates the organization, and step 3 (the contribution) links the individual from step 1 to the org of step 2 with the adequate permissions.
phew..

This process still doesn't address the issues raised on the forum post you linked to as far as adding custom fields so permissioned users can edit them.

Hope this helps
Tony
http://dharmatech.org
oss@dharmatech.org
801.541.8671

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: Associating Individual and Organization profiles with a drupal user registration
March 12, 2009, 07:29:01 pm

I think in the medium/long term we should switch to a model where the "organization" information we edit/create/view in our various "permissioned relationship" screens should be driven from a specific organization profile (with the current set of fields being the default profile included in the shipped data. This will allow folks to customize what data they collect for any organization including adding custom fields etc

if this issue is important to your current needs, consider making a code contribution. We can help out on IRC :)

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

excell@drupal.org

  • Guest
Re: Associating Individual and Organization profiles with a drupal user registration
July 17, 2009, 12:07:08 am
Sorry to bump this up but I am wondering if anyone has made any progress to allowing individual users (with the "on behalf off" permission, via employer/employee relationship), the ability to edit custom fields in an organisational profile?

Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Re: Associating Individual and Organization profiles with a drupal user registration
August 10, 2010, 07:29:54 am
I have installed civicrm in drupal. I'm quite sure that it's what I need for the website I'm about to develop, although I still consider some other option. One of the features that I'm indeed missing is such a feature to link users and employees at the registration process. Does anyone have an idea if such a features is about to be developed, or if there is an workaround or what would be required to develop such a feature?

More precisely, here's what we are looking for:
- On the website there should be a list with companies member of the organisation
- In the company details, it should be possible to see the list of the employees
- To allow as much freedom as possible we would like to allow users to create a company profil (or select an existing employer) at the registration
- One single users / employee of a company should also be able to update himself the company details

Simon

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: Associating Individual and Organization profiles with a drupal user registration
August 10, 2010, 03:49:40 pm

1. This feature is currently not in the development pipeline. We estimate that we will need approx 30-50 hours to switch to using profiles in the below case

2. You should be able to do most of the below using a combination of profiles, views and permissioned relationships

Quote from: Simon147 on August 10, 2010, 07:29:54 am
- On the website there should be a list with companies member of the organisation

Profile listing or Views2 listing

Quote from: Simon147 on August 10, 2010, 07:29:54 am
- In the company details, it should be possible to see the list of the employees

Maybe via views? or via a hook on profiles?

Quote from: Simon147 on August 10, 2010, 07:29:54 am
- To allow as much freedom as possible we would like to allow users to create a company profil (or select an existing employer) at the registration

Can be done via a hook. Based on your needs, maybe the "Current Employer" functionality meets your needs

Quote from: Simon147 on August 10, 2010, 07:29:54 am
- One single users / employee of a company should also be able to update himself the company details

Permissioned relationships will work here

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

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: Associating Individual and Organization profiles with a drupal user registration
August 10, 2010, 05:49:25 pm
Simon - you might want to try out the views i attached here - http://forum.civicrm.org/index.php/topic,14376.msg61425.html#msg61425 - hopefully it will save you some time which you can put towards lobo's estimate of getting a robust solution for adding/editing custom data about an Organisation.
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

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: Associating Individual and Organization profiles with a drupal user registration
August 20, 2010, 05:39:48 am
I'm attempting the same thing basically but can't figure out a way to do it.

I want a user to be able to register through drupal, complete their info, add their current employer (which for me would be there church or ministry name) and also be able to add their Jurisdiction/Denomination as an organization. I'm not as concerned with the user being able to edit the information later on but I do want there to be a relationship created so that if I were to view that Individuals record I could see that they were related to this particular Jurisdiction/Denomination. And then If I view the organizations record I could see everyone that is associated with that particular Denomination. I have a profile set up now that is correctly making the connections between the Individual and the Current Employer (which is the Church/Ministry name). How can I add another field to allow a person to create a link with another organization as their denomination?

Any Ideas?

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: Associating Individual and Organization profiles with a drupal user registration
August 20, 2010, 06:50:03 am

1. I dont think u can do this solely via the UI

2. you can definitely do this via hooks., i.e. writing some custom code to inject this field in etc and then creating a relationship

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Associating Individual and Organization profiles with a drupal user registration

This forum was archived on 2017-11-26.