}
if (!$contactID) {
- $contactID = CRM_Core_Session::singleton()->getLoggedInContactID();
+ $contactID = CRM_Core_Session::getLoggedInContactID();
}
$key = "{$tableName}_{$type}_{$contactID}";
CRM_Utils_System::permissionDenied();
}
// ensure that oid is not the current user, if so refuse to do the merge
- if (CRM_Core_Session::singleton()->getLoggedInContactID() == $oid) {
+ if (CRM_Core_Session::getLoggedInContactID() == $oid) {
$message = ts('The contact record which is linked to the currently logged in user account - \'%1\' - cannot be deleted.',
[1 => CRM_Core_Session::singleton()->getLoggedInContactDisplayName()]
);
$activityParams = [
'subject' => $subject,
'campaign_id' => $campaign_id,
- 'source_contact_id' => CRM_Core_Session::singleton()->getLoggedInContactID(),
+ 'source_contact_id' => CRM_Core_Session::getLoggedInContactID(),
'activity_type_id' => CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_type_id', 'Print PDF Letter'),
'activity_date_time' => date('YmdHis'),
'details' => $html_message,
}
$this->_contactId = CRM_Utils_Request::retrieve('id', 'Positive', $this);
- $userID = CRM_Core_Session::singleton()->getLoggedInContactID();
+ $userID = CRM_Core_Session::getLoggedInContactID();
$userChecksum = $this->getUserChecksum();
$validUser = FALSE;
$this->_emailExists = $this->get('emailExists');
// this was used prior to the cleverer this_>getContactID - unsure now
- $this->_userID = CRM_Core_Session::singleton()->getLoggedInContactID();
+ $this->_userID = CRM_Core_Session::getLoggedInContactID();
$this->_contactID = $this->_membershipContactID = $this->getContactID();
$this->_mid = NULL;
return [$userName, $userEmail];
}
- $userID = CRM_Core_Session::singleton()->getLoggedInContactID();
+ $userID = CRM_Core_Session::getLoggedInContactID();
if (!empty($userID)) {
list($userName, $userEmail) = CRM_Contact_BAO_Contact_Location::getEmailDetails($userID);
}
$contactFromEmails = [];
// add logged in user's active email ids
- $contactID = CRM_Core_Session::singleton()->getLoggedInContactID();
+ $contactID = CRM_Core_Session::getLoggedInContactID();
if ($contactID) {
$contactEmails = self::allEmails($contactID);
$fromDisplayName = CRM_Core_Session::singleton()->getLoggedInContactDisplayName();
$noteActions = FALSE;
- $loggedInContactID = CRM_Core_Session::singleton()->getLoggedInContactID();
+ $loggedInContactID = CRM_Core_Session::getLoggedInContactID();
if ($loggedInContactID) {
if ($loggedInContactID == $note->entity_id) {
$noteActions = TRUE;
];
// create activity with target contacts
- $id = CRM_Core_Session::singleton()->getLoggedInContactID();
+ $id = CRM_Core_Session::getLoggedInContactID();
if ($id) {
$activityParams['source_contact_id'] = $id;
$activityParams['target_contact_id'][] = $contactId;
if ($editLink && ($mask & CRM_Core_Permission::EDIT)) {
// do not allow edit for anon users in joomla frontend, CRM-4668
$config = CRM_Core_Config::singleton();
- if (!$config->userFrameworkFrontend || CRM_Core_Session::singleton()->getLoggedInContactID()) {
+ if (!$config->userFrameworkFrontend || CRM_Core_Session::getLoggedInContactID()) {
$this->_editLink = TRUE;
}
}