Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

get_user_selection_collection()

Description

Get a users' collection of type SELECTION.

There can only be one collection of this type per user. If more, the first one found will be used instead.

Parameters

ColumnTypeDefaultDescription
$user integer User ID

Return

null|integer Returns NULL if none found or the collection ID

Location

include/collections_functions.php lines 4069 to 4082

Definition

 
function get_user_selection_collection($user)
    {
    if(!
is_numeric($user))
        {
        return 
null;
        }

    
$sql sprintf("SELECT ref AS `value` FROM collection WHERE `user` = '%s' AND `type` = '%s' ORDER BY ref ASC",
        
escape_check($user),
        
COLLECTION_TYPE_SELECTION
    
);

    return 
sql_value($sqlnull);
    }

This article was last updated 12th July 2020 03:05 Europe/London time based on the source file dated 9th July 2020 17:22 Europe/London time.