The second part was to help give you some ideas... not really to use it.
Let's say the input name is user[], and then value is the user id. That'll pass it as an array, and then you could pretty simply use my first piece of code.
PHP Code:
$users = $vbulletin->input->clean_gpc('p', 'user', TYPE_ARRAY_UINT);
if ($users !== array_unique($users))
{
// something was submitted twice.
}