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) »
  • Two member groups and their profiles in Drupal 'My Account'
Pages: [1]

Author Topic: Two member groups and their profiles in Drupal 'My Account'  (Read 3337 times)

patroclas

  • Guest
Two member groups and their profiles in Drupal 'My Account'
October 08, 2008, 02:22:47 pm
I am trying to set up two types of individual contacts that each have their own profile. I have set up the two profiles to gather data from each type of contact but am unable to find a way of displaying them in the Drupal 'My Account' so that only one profile is displayed depending on the group the contact is in.

To put it another way... I have Hosts and Volunteers, each with their own profile. Is there a way to display the Host profile only in Hosts' Drupal accounts and the Volunteer profile only in Volunteers' accounts? Currently both profiles show in all 'My Account' pages.

I have looked at http://forum.civicrm.org/index.php/topic,4161.0.html which  may be a similar problem but has no solution apparently?

Would welcome any help on this.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Two member groups and their profiles in Drupal 'My Account'
October 08, 2008, 05:19:25 pm
I'm not aware of a way to do this currently. An approach that might work for you is:
- make sure each of these types of members has a separate Drupal Role
- add navigation based on role to the appropriate profile form within CiviCRM (not embedded in My Account) - e.g. civicrm/profile/edit?gid=N&reset=1
- you could name these "Host Details" or "Volunteer Details" or something like that

I think there are some posts on the forum regarding how you can redirect folks who are just registering to the appropriate profile URL after they complete the basic Drupal registration form.
Protect your investment in CiviCRM by  becoming a Member!

patroclas

  • Guest
Re: Two member groups and their profiles in Drupal 'My Account'
October 09, 2008, 02:42:19 am
Thanks Dave

Yes - having slept on this one I have come to a similar conclusion - the Drupal menu system IS assignable to roles so I will look into having a basic, common registration process handled by Drupal and then set up profile forms to be selected by the relevant group after that.
May work... :-\

patroclas

  • Guest
Re: Two member groups and their profiles in Drupal 'My Account'
October 15, 2008, 02:01:25 am
I can successfully provide access to two profile forms for gathering details from the two groups with menu links with different permissions. But the problem still remains that fields from both profiles show up in the 'Account' listing. So both groups get to see each others fields.
I can't find a way around this. Does anyone have any ideas please?

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: Two member groups and their profiles in Drupal 'My Account'
October 15, 2008, 07:15:38 am

do not expose either of those two profiles for "View/Edit User Account". This can be set in the "settings" of the profile

check:

http://drupal.demo.civicrm.org/civicrm/admin/uf/group?action=update&id=4

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

patroclas

  • Guest
Re: Two member groups and their profiles in Drupal 'My Account'
October 15, 2008, 07:30:16 am
Doh!

Thanks Donald

patroclas

  • Guest
Re: Two member groups and their profiles in Drupal 'My Account'
October 16, 2008, 02:48:19 am
First, thanks for the responses from this forum - they are really helping me get up that steep learning curve!

I am as far as having successful profiles and search listings for my two user groups. I am now looking at getting the search listings to function as I need.
I have the "Include Drupal user account information links in search results?" box checked but, in the search results list,  I would really like the link to the user account to be at the end the 'view' page instead of in the list. I have looked at listings.tpl etc but am unable to identify where the "website profile" link is generated.
I would appreciate any help on finding that code please.

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: Two member groups and their profiles in Drupal 'My Account'
October 16, 2008, 08:38:40 am

the links are generated in php code, the file is here: CRM/Profile/Selector/Listings.php (search for links, _linkToUF). The view page is here: CRM/Profile/Page/View.php

The code gets a bit hairy, so will be tricky if u r not PHP savvy

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) »
  • Two member groups and their profiles in Drupal 'My Account'

This forum was archived on 2017-11-26.