function salesforce_set_message in Salesforce Suite 7.3
Same name and namespace in other branches
- 8.3 salesforce.module \salesforce_set_message()
Salesforce set message.
Wrapper around drupal_set_message(), adding check for administer salesforce permission.
Parameters
string $message: (optional) The translated message to be displayed to the user.
string $type: (optional) The message's type. Defaults to 'status'.
bool $repeat: (optional) If this is FALSE and the message is already set, then the message won't be repeated. Defaults to TRUE.
Return value
array|null results of drupal_set_message(), if current user has permissions, or null.
See also
6 calls to salesforce_set_message()
- SalesforceSoapPartner::trySoap in modules/
salesforce_soap/ salesforce_soap.inc - Wrap SF SOAP API resources in a try-catch so that we can automatically re-auth when we have an invalid session id / access token.
- salesforce_mapping_form_submit in modules/
salesforce_mapping/ includes/ salesforce_mapping.admin.inc - Submit handler for salesforce_mapping_form().
- salesforce_oauth_callback in ./
salesforce.module - Callback for the oauth redirect URI.
- salesforce_oauth_form in ./
salesforce.module - Generate the Salesforce authorization form.
- salesforce_pull_process_updated_records in modules/
salesforce_pull/ salesforce_pull.module - Process records in the queue.
File
- ./
salesforce.module, line 379 - API and module for Salesforce integration.
Code
function salesforce_set_message($message = NULL, $type = 'status', $repeat = TRUE) {
global $user;
if ($user->uid == 1 || user_access('administer salesforce', $user)) {
return drupal_set_message($message, $type, $repeat);
}
}