mc-cms-namelessmc/core/classes/DTO/UserProfileField.php
Sam 6f15e14392
chore: fix styleci (#3588)
Co-authored-by: Sam <samerton@users.noreply.github.com>
2025-03-29 10:50:03 +00:00

35 lines
742 B
PHP

<?php
/**
* Represents a custom profile field which belongs to a user.
*
* @package NamelessMC\DTO
* @author Aberdeener
* @version 2.2.0
* @license MIT
*/
class UserProfileField extends ProfileField
{
public ?string $value;
public ?int $updated;
public ?int $upf_id;
public function __construct(object $row)
{
parent::__construct($row);
$this->value = $row->value;
$this->updated = $row->updated;
$this->upf_id = $row->upf_id;
}
public function purifyValue(): ?string
{
// TODO: option for field to support HTML
return Output::getClean($this->value);
}
public function updated()
{
return date(DATE_FORMAT, $this->updated);
}
}