You are here

function signature_forum_user_exception in Signatures for Forums 5

Same name and namespace in other branches
  1. 5.2 signature_forum.module \signature_forum_user_exception()
  2. 6 signature_forum.module \signature_forum_user_exception()

Find if uid is in min length exception list.

Parameters

$uid: User ID.

Return value

TRUE if uid is in exception list. FALSE otherwise.

1 call to signature_forum_user_exception()
signature_forum_logic in ./signature_forum.module
Signature logic, check content is long enough etc.

File

./signature_forum.module, line 310

Code

function signature_forum_user_exception($uid = 0) {
  $settings = variable_get('signature_forum_settings', signature_forum_defaults());
  $result = db_query("SELECT r.rid FROM {role} r INNER JOIN {users_roles} ur ON ur.rid = r.rid WHERE ur.uid = %d", $uid);
  while ($role = db_fetch_object($result)) {
    if ($settings['signature_forum_roles'][$role->rid] == $role->rid) {
      return TRUE;
    }
  }
  return FALSE;
}