CRM-21247 User Record link (in the Actions section of a contact record summary) is broken

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.22, 4.7.23, 4.7.24
    • Fix Version/s: 4.7.27
    • Component/s: None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Core Team Funds
    • Verified?:
      No

      Description

      when viewing a contact record (drupal 7.x, civi 4.7.22+) the User Record link under Actions has the cid appended to the end causing it to break.

      I've looked around and can not figure out why the cid is being appended

      in CRM/Utils/System/DrupalBase.php
      this formats the link
        public function getUserRecordUrl($contactID) {
          $uid = CRM_Core_BAO_UFMatch::getUFId($contactID);
          if (CRM_Core_Session::singleton()
              ->get('userID') == $contactID || CRM_Core_Permission::checkAnyPerm(array(
                'cms:administer users',
                'cms:view user account',
              ))
          ) {
            return $this->url('user/' . $uid);
          };
        }

      a temp fix is to add a slash after the uid which causes the system to ignore the cid
            return $this->url('user/' . $uid."/");

        Attachments

          Activity

          [CRM-21247] User Record link (in the Actions section of a contact record summary) is broken
          eric goldhagen added a comment -

          I tested the patch submitted and it works as expected on 4.7.24 and 4.7.22 (the two I had easily available to test on)

            People

            • Assignee:
              Unassigned
              Reporter:
              eric goldhagen

              Dates

              • Created:
                Updated:
                Resolved: