If your groups have both block access rights and module access rights then I'm afraid I have no other ideas for you. I can't reproduce the problem any other way
Rowd
include("pages/$lien.php");
$lien= "pages/".$xoopsUser->getVar('uid').".php";
include($lien);