Gdn_Plugin::setUserMeta PHP Method

setUserMeta() protected method

This method takes a UserID, Key, and Value, and attempts to set $Key = $Value for $UserID. $Key can be an SQL wildcard, thereby allowing multiple variations of a $Key to be set. $UserID can be an array, thereby allowing multiple users' $Keys to be set to the same $Value. ++ Before any queries are run, $Key is converted to its fully qualified format (Plugin. prepended) ++ to prevent collisions in the meta table when multiple plugins have similar key names. If $Value == NULL, the matching row(s) are deleted instead of updated.
protected setUserMeta ( $UserID, $Key, $Value = null ) : void
$UserID int UserID or array of UserIDs
$Key string relative user key
$Value mixed optional value to set, null to delete
return void
    protected function setUserMeta($UserID, $Key, $Value = null)
    {
        $MetaKey = $this->makeMetaKey($Key);
        $this->userMetaModel()->setUserMeta($UserID, $MetaKey, $Value);
    }