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

set_user_collection()

Description

Sets the current collection of $user to be $collection

Parameters

ColumnTypeDefaultDescription
$user integer
$collection integer

Return

void

Location

include/collections_functions.php lines 793 to 801

Definition

 
function set_user_collection($user,$collection)
    {
    global 
$usercollection,$username,$anonymous_login,$anonymous_user_session_collection;
    if(!(isset(
$anonymous_login) && $username==$anonymous_login) || !$anonymous_user_session_collection)
        {       
        
ps_query("UPDATE user SET current_collection = ? WHERE ref = ?",["i",$collection,"i",$user]);
        }
    
$usercollection=$collection;
    }

This article was last updated 19th March 2024 04:35 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.