For our use-case, individuals never directly hold memberships, only organizations do, so we force the On Behalf Of Organization part of the contribution page. There's a different contribution page for New Membership than for Membership Renewal, but they both behave identically more or less for users that already have memberships.
We need the New Membership profile to ALWAYS create a new Organization and a new membership for the created org; currently when a logged-in user with existing current or expired memberships goes to the New Membership page, the membership section shows the renewal options instead of the New Membership options. When a user selects "Create A New Organization" and fills in the details, the membership part of the page just picks the existing membership that is uppermost in the Organization Name dropdown and renews it for another year instead of creating a new membership.
Is this the expected behaviour, and can it be suppressed? Is there a URL parameter I can pass in that will force a new membership?
Edit:
I should say, this is with version 4.4.10 for Drupal.
It looks like it makes the decision in civicrm/CRM/Member/Form/Membership.php, line 205:
if ($this->_contactID) {
//check whether contact has a current membership so we can alert user that they may want to do a renewal instead
Any thoughts about how to programmatically suppress this without hacking core? My unhealthy temptation would be to do something along these lines:
if ($this->_contactID AND !($_REQUEST["forceNew"]=1)) {
//check whether contact has a current membership so we can alert user that they may want to do a renewal instead, check for "forceNew" flag in request params
which of course would be a maintenance nightmare. Is there a hook I can use instead that will allow me to change the form's behaviour? Unsetting $this->_contactID with a hook sounds unwise, but that's how it makes the call.
Thanks!