Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 19th March 2024 04:35 Europe/London time based on the source file dated 15th March 2024 09:00 Europe/London time.