Prevent users of role from being flagged?
Here is a sample code you could use for your custom template.

// Load the currently logged in user.
global $user;

// Check if the user has the 'standard' role.
if (in_array('standard', $user-&gt;roles)) {
  // enter the code to print your flag
}