I've been trying to figure out a way to automatically highlight my name in the bibliography. I thought that I could just compare first name and \namepartgiven and last name with \namepartfamily, but nothing was highlighted. The stem of the issue seems to be namepartgiven not being the same as the first name that I specified. Originally I thought it was due to \bibnamedelima, but that doesn't seem to be the case. A minimal working example is below.
\begin{filecontents*}{test.bib}
@inproceedings{hattimare2022maruna,
title = {Maruna Bot: An Extensible Retrieval-Focused Framework for Task-Oriented Dialogues},
author = {Hattimare, Amit and Dharawat, Arkin and Khan, Yelman and Lien, Yen-Chieh and Samarinas, Chris and Wei, George Z. and Yang, Yulin and Zamani, Hamed},
author+an = {6=highlight;},
year = 2022,
booktitle = {Alexa Prize TaskBot Challenge Proceedings},
url = {https://www.amazon.science/alexa-prize/proceedings/maruna-bot-an-extensible-retrieval-focused-framework-for-task-oriented-dialogues}
}
\end{filecontents*}
\documentclass{article}
\usepackage[ % BibLaTeX
sorting=ydnt, % Sorts entries by year (descending order), name, title
style=verbose,
doi=false,
isbn=true,
url=false,
eprint=false,
backref = false, % include back references in bibliography
maxcitenames=3, % affects only the citations in the document body
maxbibnames=99, % affects only the bibliography, pass 99 to print all
hyperref=true,
block=none,
backend=biber % {Options: bibtex, biber}
]{biblatex}
\usepackage{etoolbox}
\def\bibnamedelima{ }
\makeatletter
\newcommand{\name}[2]{\def@firstname{#1}\def@lastname{#2}}
\newcommand{\firstname}[1]{\def@firstname{#1}}
\newcommand*{\lastname}[1]{\def@lastname{#1}}
\renewcommand*{\mkbibnamefamily}[1]{%
\ifboolexpr{ test {\ifdefstrequal{\namepartgiven}{@firstname}}
and
test {\ifdefstrequal{\namepartfamily}{@lastname}}}
{\textbf{#1}}%
{#1}%
}
\renewcommand*{\mkbibnamegiven}[1]{%
\ifboolexpr{ test {\ifdefstrequal{\namepartgiven}{@firstname}}
and
test {\ifdefstrequal{\namepartfamily}{@lastname}}}
{\textbf{#1}}%
{#1}%
}
\makeatother
\name{George Z.}{Wei}. % My name should be highlighted, but it isn't????
% I narrowed it down to the first name (\namepartgiven), but not sure why it doesn't work
\addbibresource{test.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
Could anyone explain to me why this isn't highlighting my name and how to fix it?

