You are here

function mass_contact_perm in Mass Contact 5.2

Same name and namespace in other branches
  1. 5 mass_contact.module \mass_contact_perm()
  2. 6 mass_contact.module \mass_contact_perm()

Implementation of hook_perm().

File

./mass_contact.module, line 53
This is the main code file for the Mass Contact module. This module enables users to contact multiple users through selected roles.

Code

function mass_contact_perm() {
  $permissions = array(
    'administer mass contact',
    'choose whether to archive mass contact messages',
    'create mass_contact content',
    'send mass contact attachments',
    'send mass contact e-mails',
  );
  $result = db_query('SELECT category FROM {mass_contact}');
  while ($category = db_fetch_object($result)) {
    $permissions[] = 'send to users in the ' . $category->category . ' category';
  }
  return $permissions;
}