vBulletin v6.0.4

vB_Library_ReferUser extends vB_Library
in package

vB_Library_ReferUser

Tags
access

public

Table of Contents

Methods

__serialize()  : array<string|int, mixed>
__sleep()  : array<string|int, mixed>
__unserialize()  : void
__wakeup()  : void
clearCache()  : mixed
deleteExpiredReferralCodes()  : mixed
Deletes old, expired referral codes; used by cron job
fetchReferrers()  : array<string|int, mixed>
Return a report of referrers
getContentInstance()  : mixed
getReferralCode()  : string
Generates and returns a user referral code for the currently logged in user
getUseridFromReferralCode()  : bool|int
Validates a user referral code and returns the associated user id
instance()  : static
Returns singleton instance of self.
monitorWords()  : mixed
Checks if the text contains monitored words, and if so, sends notifications to admins and moderators if the setting is on.
validateReferralCode()  : bool|string
Validates a user referral code

Methods

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__sleep()

public __sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>

__unserialize()

public __unserialize(array<string|int, mixed> $serialized) : void
Parameters
$serialized : array<string|int, mixed>

clearCache()

public static clearCache() : mixed

deleteExpiredReferralCodes()

Deletes old, expired referral codes; used by cron job

public deleteExpiredReferralCodes() : mixed

fetchReferrers()

Return a report of referrers

public fetchReferrers(array<string|int, mixed> $startdate, array<string|int, mixed> $enddate) : array<string|int, mixed>
Parameters
$startdate : array<string|int, mixed>

Start Date of the report. an array of 'year', 'month', 'day', 'hour' and 'minute'

$enddate : array<string|int, mixed>

End Date of the report. an array of 'year', 'month', 'day', 'hour' and 'minute'

Return values
array<string|int, mixed>

Referrers information

getContentInstance()

public static getContentInstance(mixed $contenttypeid) : mixed
Parameters
$contenttypeid : mixed

getReferralCode()

Generates and returns a user referral code for the currently logged in user

public getReferralCode() : string
Return values
string

The referral code

getUseridFromReferralCode()

Validates a user referral code and returns the associated user id

public getUseridFromReferralCode(string $referralCode) : bool|int
Parameters
$referralCode : string

The referral code to validate

Return values
bool|int

Returns the user id associated with the referral code if it is valid and active, false otherwise

instance()

Returns singleton instance of self.

public static instance(mixed $class) : static
Parameters
$class : mixed
Return values
static
  • Reference to singleton instance of the requested library class

monitorWords()

Checks if the text contains monitored words, and if so, sends notifications to admins and moderators if the setting is on.

public monitorWords(mixed $text, mixed $type, mixed $nodeid[, mixed $userid = null ][, mixed $insertNotifications = true ][, mixed $currentuserid = 0 ]) : mixed
Parameters
$text : mixed
$type : mixed
$nodeid : mixed
$userid : mixed = null
$insertNotifications : mixed = true
$currentuserid : mixed = 0
Tags
deprecated

use the functions from the notification library directly.

validateReferralCode()

Validates a user referral code

public validateReferralCode(string $referralCode) : bool|string
Parameters
$referralCode : string

The referral code to validate

Return values
bool|string

Returns the cleaned referral code if it is valid and active, false otherwise


        
On this page

Search results