PHP: Check if user has updated support ticket.

Hello

What would be the php code to use to check if a user has any updated tickets that are for example "Waiting on User to reply"? Is there any built in code for the plugin to check this?

Many thanks.