Function __global->cns_mod_log_it

Definitions

sources/cns_general_action2.php

  • Log a moderation action.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$the_type ID_TEXT No No required parameter N/A N/A The type of moderation
$param_a SHORT_TEXT No No Blank (empty string) N/A N/A First detailing parameter
$param_b SHORT_TEXT No No Blank (empty string) N/A N/A Second detailing parameter
$reason LONG_TEXT No No Blank (empty string) N/A N/A The reason for the moderation (may be blank)
$by ?MEMBER No No Null N/A N/A The member performing the moderation (null: current member)
$timestamp ?TIME No No Null N/A N/A The time of the moderation (null: just now)

Returns

  • The log ID
  • Type: AUTO_LINK
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Log a moderation action.
 *
 * @param  ID_TEXT $the_type The type of moderation
 * @param  SHORT_TEXT $param_a First detailing parameter
 * @param  SHORT_TEXT $param_b Second detailing parameter
 * @param  LONG_TEXT $reason The reason for the moderation (may be blank)
 * @param  ?MEMBER $by The member performing the moderation (null: current member)
 * @param  ?TIME $timestamp The time of the moderation (null: just now)
 * @return AUTO_LINK The log ID
 */

function cns_mod_log_it(string $the_type, string $param_a = '', string $param_b = '', string $reason = '', ?int $by = null, ?int $timestamp = null) : int