Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19028

Change get(userID) to getLoggedInContactID()

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.9
    • Fix Version/s: 4.7.13
    • Component/s: None
    • Labels:
    • Documentation Required?:
      None
    • Sprint:
      4.7.10 Code improvement
    • Funding Source:
      Contributed Code

      Description

      Just logging this to track some code tidy up. Mostly replacing

      $session = CRM_Core_Session::singleton();
      $userID = $session->get('userID');

      With
      $userID = CRM_Core_Session::singleton()->getLoggedInContactID();

      which is just a minor code simplification & my main motive is improve the code created when people do copy & paste
      https://github.com/civicrm/civicrm-core/pull/8635

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: