Stud.IP  6.0
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.


Member Function Documentation

◆ is_king()

static is_king (   $user_id,
  $textual = FALSE 

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.

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

Field Documentation


const CACHE_KEY = 'core/kings'

key to use for caching


const NUM_KINGS = 1

How many of each type should be awarded?

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