}
else {
//Get the id of Logged in User
- $session = CRM_Core_Session::singleton();
- $contactID = $session->get('userID');
+ $contactID = CRM_Core_Session::getLoggedInContactID();
if (!empty($contactID)) {
$contactIDs[$contactID] = NULL;
}
$query = "SELECT distinct( contact_id )
FROM civicrm_dashboard_contact WHERE dashboard_id = {$dashlet->id}";
$dao = CRM_Core_DAO::executeQuery($query);
- $skipContactIDs = array();
while ($dao->fetch()) {
- if(array_key_exists($dao->contact_id, $contactIDs)) {
+ if (array_key_exists($dao->contact_id, $contactIDs)) {
unset($contactIDs[$dao->contact_id]);
}
}