I'm trying to set up something to decide wether the current post has a custom taxonomy term that matches the current users ID.
So far I set up a variable that stores the taxonomy terms of the given post with
$terms = get_terms( array( 'taxonomy' => 'list' ));
But now I don't know how to loop through that list of terms in order to match one of the terms names with the user ID. Also, is there a way to do this without running into troubles when for example the user ID is 3 and the post has a term with the name of 30. In this case I do not want this to be a match.
Any guidance is appreciated.