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

update_collection_user()

Description

Update collection to belong to a new user

Parameters

ColumnTypeDefaultDescription
$collection integer Collection ID
$newuser integer User ID to assign collection to

Return

boolean success|failure

Location

include/collections_functions.php lines 3981 to 3988

Definition

 
function update_collection_user($collection,$newuser)
    {   
    if (!
collection_writeable($collection))
        {
debug("FAILED TO CHANGE COLLECTION USER " $collection);return false;}
        
    
ps_query("UPDATE collection SET user=? WHERE ref=?",array("i",$newuser,"i",$collection));  
    return 
true;    
    }

This article was last updated 20th April 2024 12:35 Europe/London time based on the source file dated 19th April 2024 15:45 Europe/London time.