From 34f493fb0dac55b00316db31edae14e4b9188ce5 Mon Sep 17 00:00:00 2001 From: John Kingsnorth Date: Mon, 14 Aug 2017 14:38:31 +0100 Subject: [PATCH] [NFC] Simplify method of getting logged in contact ID Use the existing utility function getLoggedInContactID, rather than loading the session and then calling get->userID. --- CRM/Profile/Form/Edit.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CRM/Profile/Form/Edit.php b/CRM/Profile/Form/Edit.php index 63e741ee58..ac84a3fc93 100644 --- a/CRM/Profile/Form/Edit.php +++ b/CRM/Profile/Form/Edit.php @@ -88,8 +88,7 @@ class CRM_Profile_Form_Edit extends CRM_Profile_Form { if ($this->get('edit')) { // make sure we have right permission to edit this user - $session = CRM_Core_Session::singleton(); - $userID = $session->get('userID'); + $userID = CRM_Core_Session::getLoggedInContactID(); // Set the ID from the query string, otherwise default to the current user $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, $userID); -- 2.25.1