Collections functions
General functions
Render functions
Theme permission functions
Resource functions

message_purge()

Description

Remove all messages from message and user_message tables that have expired (regardless of read).
This will be called from a cron job.

Parameters

This function accepts no parameters.

Return

void

Location

include/message_functions.php lines 409 to 413

Definition

 
function message_purge()
    {
    
ps_query("DELETE FROM user_message WHERE message IN (SELECT ref FROM message where expires < NOW())", array());
    
ps_query("DELETE FROM message where expires < NOW()", array());
    }

This article was last updated 29th January 2023 22:05 Europe/London time based on the source file dated 12th January 2023 10:25 Europe/London time.