Merge pull request #10197 from GinkgoFJG/CRM-20458
[civicrm-core.git] / CRM / Contact / Page / DashBoard.php
index 142b31514a321532ef11df8d165d63f724377302..69e792b62179355af36ad774758e70b26c9db88e 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016                                |
+ | Copyright CiviCRM LLC (c) 2004-2017                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
  */
 
 /**
@@ -46,15 +46,8 @@ class CRM_Contact_Page_DashBoard extends CRM_Core_Page {
     $resources->addStyleFile('civicrm', 'css/dashboard.css');
     $this->assign('contactDashlets', CRM_Core_BAO_Dashboard::getContactDashletsForJS());
 
-    $resetCache = CRM_Utils_Request::retrieve('resetCache', 'Positive', CRM_Core_DAO::$_nullObject);
-
     CRM_Utils_System::setTitle(ts('CiviCRM Home'));
-    $session = CRM_Core_Session::singleton();
-    $contactID = $session->get('userID');
-
-    if ($resetCache) {
-      CRM_Core_BAO_Dashboard::resetDashletCache($contactID);
-    }
+    $contactID = CRM_Core_Session::getLoggedInContactID();
 
     // call hook to get html from other modules
     // ignored but needed to prevent warnings