mycred_add_new_notice

Description

This function allows you to add a new notification for a specific user. Notifications are shown when the user logs in (if the notice is generated when they are not online) or on the next page reload (if they are logged in).

This function is only available if the Notifications add-on is enabled.

Available since version 1.0

Returns

void

Parameters

Param Type Required Description
function mycred_add_new_notice(
$notice array Yes

An associative array containing the message and the ID of the user that it is intended for.

$lifespan int No

The lifespan of the message. The value is multiplied with the number of seconds there is in a day.

) { ... }

Examples

No example found.