CRM-13148 Allow logged in users to use contribution / membership form with cid like with participant

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.0
    • Fix Version/s: 4.4.0
    • Component/s: None
    • Labels:
      None

      Description

      One option we discussed for improving membership / pledge / contribution data entry was to extend the cid=0 concept to the contribution form.

      I took a peak at the code & it was extremely easy to do this & all the flows I tested worked. However, unless someone else wants to do some testing I'll just leave this for tracking purposes. If someone does want to test I'm happy to do the code fix ups.

      Flows I tested
      1) logged in user does a pledge or contribution by credit card or pay later & it is applied to them
      2) logged in user does a pledge or contribution by credit card with cid=0 in the url & a new contact is created (credit card & pay later, pledge & contributon)
      3) logged in user does a pledge or contribution by credit card with cid=200 in the url where 200 is a contact they have permission to (credit card / pay later / contributon). It is applied to user 200.
      4) logged out user puts either 0 or 200 in the url - payment is applied to them as if they hadn't meddled with the url

      In all cases defaults filled correctly & contributions / pledges were assigned to the correct contact. No testing of mail.

        Attachments

          Activity

          [CRM-13148] Allow logged in users to use contribution / membership form with cid like with participant
          Eileen McNaughton added a comment -

          https://github.com/eileenmcnaughton/civicrm-core/compare/CRM-13148

          just looking at it looks like the create CMS user account flow needs testing

          David Greenberg added a comment -

          If I can apply the patch, I'll test the following:

          • Create CMS User
          • Membership signup and renewal
          • Pay later
          Eileen McNaughton added a comment -

          Just thinking - I didn't check receipts

          NB - to make it really use I feel like logged in users with cid=0 in the url who have permission to view one or more other contacts should get a new / select contact field added to the form (I'm a bit torn on the new part but it seems consistent with other stuff)

          David Greenberg added a comment -

          Tested the other combinations including create CMS User, receipting, and membership signup.
          https://github.com/civicrm/civicrm-core/pull/1326

          Eileen McNaughton added a comment -

          Thanks Dave for testing

          As an aside for anyone looking later there is an fn that should have code removed as it duplicates the call here (I didn't do a PR just to add the comments below but here they are

          /**

          • (largely duplicate) Function to authenticate pledge user during online payment.
          • @todo CRM-13148 causes checksum & cid checking to be done at the page level so there
          • is duplication here for review
          • @access public
            *
          • @return None
            */
            public function authenticatePledgeUser() {
            //get the userChecksum and contact id
            $userChecksum = CRM_Utils_Request::retrieve('cs', 'String', $this);
            $contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
          xavier dutoit added a comment -

          Awesome!

          Eileen McNaughton added a comment -

          I just found another spot that needs to be fixed

          David Greenberg added a comment -

          Reassigning to you because I have no idea what the 'other spot' might be

          Eileen McNaughton added a comment -

          Yeah - looks like kurund has pulled the new PR. Also looked like I put the wrong issue number in a tidy up commit & it's showing here

            People

            • Assignee:
              Eileen McNaughton
              Reporter:
              Eileen McNaughton

              Dates

              • Created:
                Updated:
                Resolved: