UserModel::saveAttribute PHP Méthode

saveAttribute() public méthode

This is a convenience method that uses $this->SaveToSerializedColumn().
public saveAttribute ( integer $UserID, mixed $Attribute, mixed $Value = '' )
$UserID integer The UserID to save.
$Attribute mixed The name of the attribute being saved, or an associative array of name => value pairs to be saved. If this is an associative array, the $Value argument will be ignored.
$Value mixed The value being saved.
    public function saveAttribute($UserID, $Attribute, $Value = '')
    {
        // Make sure that changes to the current user become effective immediately.
        $Session = Gdn::session();
        if ($UserID == $Session->UserID) {
            $Session->setAttribute($Attribute, $Value);
        }
        return $this->saveToSerializedColumn('Attributes', $UserID, $Attribute, $Value);
    }
UserModel