CONST AUTH_SRC_UNKNOWN = 0, AUTH_SRC_CHECKSUM = 1, AUTH_SRC_SITEKEY = 2, AUTH_SRC_LOGIN = 4;
/**
- * get the current permission of this user
+ * Get the current permission of this user
*
* @return string the permission of the user (edit or view or null)
*/
}
/**
- * given a permission string or array, check for access requirements
+ * Given a permission string or array, check for access requirements
* @param mixed $permissions the permission to check as an array or string -see examples
* arrays
*
}
/**
- * @param $gid
+ * @param int $gid
* @param int $type
*
* @return bool
}
$groups = self::ufGroup($type);
- return in_array($gid, $groups) ? TRUE : FALSE;
+ return !empty($groups) && in_array($gid, $groups) ? TRUE : FALSE;
}
/**
/**
* @param int $type
- * @param null $eventID
+ * @param int $eventID
* @param string $context
*
* @return array|null
}
/**
- * check permissions for delete and edit actions
+ * Check permissions for delete and edit actions
*
* @param string $module component name.
- * @param $action action to be check across component
+ * @param integer $action action to be check across component
*
*
* @return bool
}
/**
- * Function to get component name from given permission.
+ * Get component name from given permission.
*
* @param string $permission
*