Collections functions
Encryption functions
General functions
Theme permission 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 2696 to 2703

Definition

 
function update_collection_user($collection,$newuser)
    {    
    if (!
collection_writeable($collection))
        {
debug("FAILED TO CHANGE COLLECTION USER " $collection);return false;}
        
    
sql_query("UPDATE collection SET user='" escape_check($newuser) . "' WHERE ref='" escape_check($collection) . "'");  
    return 
true;    
    }

This article was last updated 16th July 2020 00:05 Europe/London time based on the source file dated 15th July 2020 16:37 Europe/London time.