You are here

function security_review_trusted_roles in Security Review 6

Same name and namespace in other branches
  1. 7 security_review.inc \security_review_trusted_roles()

Helper function for assumed trusted roles.

1 call to security_review_trusted_roles()
security_review_check_name_passwords in ./security_review.inc

File

./security_review.inc, line 837
Stand-alone security checks and review system.

Code

function security_review_trusted_roles() {
  $trusted_roles = array();
  $untrusted_roles = security_review_untrusted_roles();
  $result = db_query('SELECT rid, name FROM {role} WHERE rid NOT IN (' . db_placeholders($untrusted_roles) . ')', $untrusted_roles);
  while ($role = db_fetch_object($result)) {
    $trusted_roles[$role->rid] = $role->name;
  }
  return array_filter($trusted_roles);
}