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) »
  • Organization Members/Profile in My Account
Pages: [1]

Author Topic: Organization Members/Profile in My Account  (Read 4002 times)

ansm

  • Guest
Organization Members/Profile in My Account
November 07, 2008, 12:07:57 pm
I've searched the forums for how to let an organization join; additionally, how to let two groups of organizations join.  This involves Profiles with Join on Behalf of checked.
I've found 3 approaches;
1 Using Contribute on Behalf Of, a new feature of 2.1 under Profiles.  Also under Advanced Settings, check Create Drupal Account.
2 Getting Profiles for two groups to show under My Account; each membership type only sees it's own Profile fields.
3 Bypassing everything and directly linking to a Profile page (like when you click Preview Profile).

Method 1: Overview of Steps Taken
I made an Organization contact to have something to join to,
An Individual Profile - that is, a Profile with only fields Individual->First Name and Last Name,
Checked create Drupal User account,
checked On Behalf Of,
Enabled User->Permissions for Contact Dashboard,
Made a Membership Type,
Made a Contribution Page and Including the Individual Profile,
Enabled Offline Payment (now you can click Pay by Check and don't have to bother configuring a Payment Processor).
Now on the Contribution Page I see, enter email, then,
check I am Contributing on Behalf of an Organization,
then Organization Details appears
---- Question: Can I customize which fields appear, and their labels, in this section?----
!IMPORTANT! You must do the testing in a browser which is not logged in as Admin
I fill it in.  Next appears the Profile I included.  I fill in first and last name. I also check
Create User account and fill in a login name.
----- Question: Can I automatically check both create account and on Behalf of as these always apply for me?
After some confirmations, the Contribution is processed.  User Users-List I see the new user created.  I notice that their email is the Organizations email.  In some sense, this user *is* the Organization.
To confirm this, I found My Account->View Dashboard.
Several things are wrong here; even though I have both the User and the Organization sent to a group (not detailed in my overview), it says you are subscribed to No Group(s).
Also, My Organizations is empty.
Possibly this works if you create the contacts and relationships by hand, but with automatically creating a Drupal User Account, it's not working.
----- Question: is this a bug or can the 2.1 feature of Behalf Of work with create user account?

Method 2:  Custom Info appears under My Account
It seems a few other people expect it to work like this; that you can just create a Profile, use the Profile on a registration form, and then the Profile appears automatically under My Account.  This seems quite logical, and it does work to a point:
If you have two types of membership, with their own Profiles, both Profiles will show under My Account.  Only one will be filled in, or both may be blank, are some configuration symptoms.
I tried using CiviMember ACLs but it seemed to have no effect.  Here's approximately how it would work:
Create two membership types, perhaps different prices, each with their own Profile.
Include the Profile on the Contribution page.
Civicrm->Manage Groups.  Add a Group for each membership type.
You can provide two signup links to separate these memberships.  I had to do this because I had different prices.
Create a civi Role (different from a Drupal role! See civicrm->Access Control) for each membership type.  This is just a placeholder for an ACL as you'll see in a moment.
Create an ACL for the role to edit only a Group.
You can also try specifying the signup Profile, which should give the same effect.
Assign the Role to a Group of users.
Now in the Profile, advanced settings, check automatically add to a group.  This lets the registration page add the new user to a group.
This should let you edit/view only the Profile which belongs to your Group under My Account, but I couldn't get it to work.  At best, some custom fields disappeared.
Under My Account, I would see two Profiles listed as tabs.
----Question: Is there a way to display only your own Profile under My Account?

Method 3: Using a Profile page by itself
The Profile page is something like /profile?gid=x where gid is the Profile ID which you see listed when you go to Profiles.  If you preview the Profile, you will see what I mean.
Someone created a Drupal role (not a civicrm role) for each membership type.  Then they were able to create two menus; a direct link to the Profile for Membership Type 1 and for Membership Type 2.  Then by assigning User Permissions to Roles, you could give permission for one menu to show for each role.
Now to sync Drupal roles with Civicrm, you put the users into Civicrm Groups (a settings under Profiles, to automatically add to a group), then you can use the groups to roles modules.
I haven't tried this yet. 
----Question: did anyone get this to work? Is that about how I do it?

Further Questions
I have 5 membership types, two types of Organization, 3 types of individuals, they all have different prices.  I need custom information for each type.  I need to collect all information on one registration, and let them view this information from their Account somehow and update it.
For example, there is a commercial Organization, and Museum Organization.  The Museums *should* have an extra property of Organization, museum name.
Due to all the limitations in mixed types of Profiles, I don't think I can collect museum name directly into Organization Details of method 1, method 2 looks promising, and method 3 might work but then I'd be left without a working Contact Dashboard.  Next version maybe?  Any other ideas?
Thanks
ps long message but I believe it is also a useful summary on the topic.

References:
What I call Method 2:
Two member groups and their profiles in Drupal 'My Account'
http://forum.civicrm.org/index.php/topic,5133.0.html

User registration profiles linked to my account??
http://forum.civicrm.org/index.php/topic,5110.0.html

How to enable a Drupal User to edit their own CiviCRM info with a Profile?
http://forum.civicrm.org/index.php/topic,4972.0.html

Displaying profile on drupal user account page
http://forum.civicrm.org/index.php/topic,4788.0.html
« Last Edit: November 07, 2008, 12:18:08 pm by ansm »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Organization Members/Profile in My Account
November 07, 2008, 05:38:34 pm
Quote
Method 1:
---- Question: Can I customize which fields appear, and their labels, in this section?----
No - not without modifying the code (add fields) and/or creating a custom template for that section of the form (remove fields / change labels).

Quote
Method 1:
----- Question: Can I automatically check both create account and on Behalf of as these always apply for me?
You can "hack" this by customizing the template(s). There's discussion of this recently elsewhere on this forum. In 2.2 there will be  admin / UI controlled options to "force".

Quote
Method 1:
Several things are wrong here; even though I have both the User and the Organization sent to a group (not detailed in my overview), it says you are subscribed to No Group(s).
Also, My Organizations is empty.
Possibly this works if you create the contacts and relationships by hand, but with automatically creating a Drupal User Account, it's not working.
----- Question: is this a bug or can the 2.1 feature of Behalf Of work with create user account?
Your newly created user should have the On Behalf Of organization listed in My Organizations in their contact dashboard (and "under the covers" they should have a permissioned Employee of relationship to that org - which you can view from their contact record's Relationship tab). If this is not happening on your site, please recreate on the public 2.1 demo and file a bug report with details.

By "sent to a Group", do you mean there's a profile in the contrib page with an "Add to Group" setting? If so,  the expected behavior is to add the Individual who is submitting the form to the group. If this is not happening on your site, please recreate on the public 2.1 demo and file a bug report with details.

Adding the Organization to the group - in addition or instead - might be considered a "missing feature". If this is what you need / expect, please consider filing a patch for this for 2.2.

Quote
Method 2:
----Question: Is there a way to display only your own Profile under My Account?
No. Profiles are only segmented by "type of Contact" - and as of 2.0 we always consider the Drupal user to be an individual - so all profiles with type = Individual or Contact are included.

Quote
Method 3:
----Question: did anyone get this to work? Is that about how I do it?
I think this is your best approach. We will be releasing an updated version of civicrm_group_roles module which should handle the synch nicely. You can get an "advance copy" directly from svn at: http://svn.civicrm.org/civicrm/branches/v2.1/drupal/modules/civicrm_group_roles/

Quote
Due to all the limitations in mixed types of Profiles, I don't think I can collect museum name directly into Organization Details of method 1, method 2 looks promising, and method 3 might work but then I'd be left without a working Contact Dashboard.
If you go with method 3 and need the individual users who are connected to your organizations to have access to a dashboard for the organizations, you will have to manually or programatically create a permissioned relationships between the individual contact and "their organization".

Protect your investment in CiviCRM by  becoming a Member!

ansm

  • Guest
Re: Organization Members/Profile in My Account
November 08, 2008, 03:10:22 am
Thanks for your quick and considered reply.

I've filed a bug, http://issues.civicrm.org/jira/browse/CRM-3816
that method 1 doesn't work at all.
(p.s. everyone should download that bug report, it's very complete and contains all steps with screenshots from start to finish of setting up a membership page the way it's supposed to work.)

Quote
Profiles are only segmented by "type of Contact" - and as of 2.0 we always consider the Drupal user to be an individual - so all profiles with type = Individual or Contact are included.
Is it possible to have two classes of users, with unique profile fields, and each group can only see their respective profile tab in My Account?
Btw, I have seen Profiles with Organization fields that weren't blank, showing up under My Account.

Question: is there a way to import individuals and their organizations with the employee relationship between them?

Thanks.
« Last Edit: November 08, 2008, 03:13:40 am by ansm »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Organization Members/Profile in My Account
November 08, 2008, 03:23:51 pm
Quote from: ansm on November 08, 2008, 03:10:22 am
Is it possible to have two classes of users, with unique profile fields, and each group can only see their respective profile tab in My Account?
Btw, I have seen Profiles with Organization fields that weren't blank, showing up under My Account.

Not possible AFAIK w/o coding. Might be a good use case for a small drupal module??

Quote from: ansm on November 08, 2008, 03:10:22 am
Question: is there a way to import individuals and their organizations with the employee relationship between them?

Yes - when mapping your import, selected " - related contact - " and you can do this. However, the relationships will not have the permissioned flag set, you'll need to do that post facto manually or via SQL (set civicrm_relationship.is_permission_a_b = 1 for the relevant records).
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Organization Members/Profile in My Account

This forum was archived on 2017-11-26.