function mandrill_test_access in Mandrill 8
Same name and namespace in other branches
- 6 mandrill.module \mandrill_test_access()
- 7.2 mandrill.module \mandrill_test_access()
- 7 mandrill.module \mandrill_test_access()
Access callback for sending test email.
Return value
bool True if current user has access to send test messages
File
- ./
mandrill.module, line 35 - Enables Drupal to send email directly through Mandrill.
Code
function mandrill_test_access() {
$has_permission = \Drupal::currentUser()
->hasPermission('administer mandrill');
$key = \Drupal::config('mandrill.settings')
->get('mandrill_api_key');
return $has_permission & !empty($key);
}