Anyone who signs up online for a membership on our site must create a Drupal user account at the same time (advanced setting on profile used for membership sign up). This gives them access to member-only benefits.

We want to make use of the ability for logged in users to complete a membership form on behalf of someone else (for our volunteers who take memberships from people using our helpline).

However, if a volunteer is logged in they can't create a Drupal User account for someone else.

We can create a drupal user for a civicrm contact just by tagging them, but although a profile can be set to automatically add someone to a group, the ability to automatically tag someone doesn't exist. Adding people to a group automatically then tagging them latter on based on that group membership is not ideal.

Can a (post or postProcess?) hook be used to tag the new contact when a profile is submitted on a contribution page being filled in by another logged-in user?

Additional information:

It is a CiviCRM 4.4.16 / Drupal 7 site.

These are paid memberships and we use pricesets due to our pricing structure, so I don't think switching to webforms is an easy option. If we wanted to use webforms I think we would have to more than double the number of memberships types in the system and have some custom code rewritten.

The profile I am referring to is on a contribution page for a paid membership that is specifically designed for volunteers to fill in on behalf of someone else. The profile is the main "Name and Address" profile on the page ie. the one that would usually be set to force someone to create a Drupal user account when they joined.

At the moment that is how the profile is set up - the person filling in the form must create a Drupal user account. If a logged in volunteer tries to access this membership page they are forcibly logged out before they can start to fill in the form, so they are filling it in as if they are the person joining up.

I would like to remove the requirement that they must be logged out to sign up on behalf of a new member. However, I need to have the Drupal User account created at the time the membership is submitted, so just adding "&cid=0" to the membership form URL is not enough.

I have seen Erik's blog on CiviRules and think it may provide a solution, but as always, money is short and I have been put off by "We would recommend organizations to get a CiviCRM partner to assist them at least in the initial configuration and thinking about CiviRules.". I am looking to extend my (very limited) developer skills and thought an extension to implement a hook to do this might not be totally impossible for me.

  • Where/How are your profiles being used Joanne
    – petednz - fuzion
    Jul 10, 2015 at 21:19

2 Answers 2


You could set up a drupal webform to accomplish this. A webform can do everything a standalone profile form can do, plus a lot more, including tagging.

  • See additional information in question that I forgot to include.
    – JoAnne
    Jul 11, 2015 at 1:30

I found I could do this painlessly using CiviRules. I edited the profile to include automatic assignment to a group, then created a rule to assign a tag to anyone being added to that group.

The CiviRules extension looks like it will be very useful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.