Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

message_seen_all()

Description

Flags all non-read messages as read for given user and seen type

Parameters

ColumnTypeDefaultDescription
$user int User ID
$seen_type int MESSAGE_ENUM_NOTIFICATION_TYPE_SCREEN - see definitons.php

Return

void

Location

include/message_functions.php lines 391 to 401

Definition

 
function message_seen_all($user,$seen_type=MESSAGE_ENUM_NOTIFICATION_TYPE_SCREEN)
    {
    
$messages = array();
    if (
message_get($messages,$user,true))
        {
        foreach(
$messages as $message)
            {             
            
message_seen($message['ref']);
            }
        }
    }

This article was last updated 19th March 2024 03:05 Europe/London time based on the source file dated 15th March 2024 09:00 Europe/London time.