From 83564f9429651025d2ebd5fece11cfed4f7e87d9 Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 13 Feb 2019 13:31:44 +1300 Subject: [PATCH] REF minor code readability improvements --- CRM/Contact/Page/View/UserDashBoard.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CRM/Contact/Page/View/UserDashBoard.php b/CRM/Contact/Page/View/UserDashBoard.php index c25e8d15ec..b9863de198 100644 --- a/CRM/Contact/Page/View/UserDashBoard.php +++ b/CRM/Contact/Page/View/UserDashBoard.php @@ -58,16 +58,12 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page { public function __construct() { parent::__construct(); - $check = CRM_Core_Permission::check('access Contact Dashboard'); - - if (!$check) { + if (!CRM_Core_Permission::check('access Contact Dashboard')) { CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/dashboard', 'reset=1')); } $this->_contactId = CRM_Utils_Request::retrieve('id', 'Positive', $this); - - $session = CRM_Core_Session::singleton(); - $userID = $session->get('userID'); + $userID = CRM_Core_Session::singleton()->getLoggedInContactID(); $userChecksum = $this->getUserChecksum(); $validUser = FALSE; -- 2.25.1