Stud.IP  5.4
StudipKing Class Reference

Static Public Member Functions

static is_king ($user_id, $textual=FALSE)
 

Data Fields

const NUM_KINGS = 1
 
const CACHE_KEY = 'core/kings'
 

Detailed Description

This class awards honours (crowns) to users posting a lot in the bulletin boards, writing a lot of wiki pages and so on.

Author
mlunzena

Member Function Documentation

◆ is_king()

static is_king (   $user_id,
  $textual = FALSE 
)
static

Returns the awards of a user as an associative array consisting of "award type" => "amount of posts, wiki pages etc." pairs that belong to this user. If the 2nd parameter is set to true, the values are descriptional strings instead of the raw numbers.

Parameters
stringa string containing the MD5ish ID of the user
boolTRUE to return descriptional text, FALSE to return raw numbers, which is the default
Returns
array an associative array mapping the awards to an amount

Field Documentation

◆ CACHE_KEY

const CACHE_KEY = 'core/kings'

key to use for caching

◆ NUM_KINGS

const NUM_KINGS = 1

How many of each type should be awarded?


The documentation for this class was generated from the following file: