So you know, you don't have to make a query for that information, its in the variable
$mysidia->user->usergroup->gid, which exists in exactly the same way
$mysidia->user->gid did in your query..
PHP Code:
$redirect = "";
switch ($mysidia->user->usergroup->gid){
case 1: $redirect= "yes"; break;
case 2: $redirect= "yes"; break;
case 3: $redirect= "yes"; break;
case 4: $redirect = "yes"; break;
case 5: $redirect= "yes"; break;
default; $redirect = "no";
}
if ($redirect == "yes"){
$document->add(new Comment("<meta http-equiv='refresh' content='0; URL=http://www.dinotracks.mysidiahost.com/account' />"));
}
Which works great if you want to, in the future, redirect to different areas for the different groups, I guess...? But if you're only wanting different behavior for one of them... You could literally just do this in one if statement (if user group id does not equal 6, then redirect).
PHP Code:
if ($mysidia->user->usergroup->gid !== 6){
$document->add(new Comment("<meta http-equiv='refresh' content='0; URL=http://www.dinotracks.mysidiahost.com/account' />"));
}
I'm not sure if you could get away with a php header redirect with Mysidia's messiness, but I don't think have things up and running to test it out - so if your html redirect is good enough for your purposes, great!