Try this, I do something similar to make sure certain group members have access to addon pages on my site:
if (preg_match("-6-", $user[U_Groups]) )
Should look through the U_Groups variable and match for 6.
For example with your code:
if ((preg_match("-6-", $user[U_Groups])) || (preg_match("-10-", $user[U_Groups])) || (preg_match("-11-", $user[U_Groups])) || (preg_match("-12-", $user[U_Groups]))) {
Hope that helps.