protected function attached($presenter) { parent::attached($presenter); if (!$this->isSubmitted()) { $row = dibi::fetch("SELECT * FROM users WHERE username = %s", $presenter->user->id); $row['tags'] = $row['tags']; $row['projects'] = array_map(function ($a) { return trim($a, '()'); }, explode(",", $row['projects'])); if ($row) { $this->setValues($row); } } }