public function add($username, $email, $password)
{
try {
$this->database->table(self::TABLE_NAME)->insert([self::COLUMN_NAME => $username, self::COLUMN_PASSWORD_HASH => Passwords::hash($password), self::COLUMN_EMAIL => $email]);
} catch (Nette\Database\UniqueConstraintViolationException $e) {
throw new DuplicateNameException();
}
}