$user = JFactory::getUser();
$user_id = xxxxxx;
if( in_array($user_id, $user->groups ) ) {
return true;
} else {
$timestamp = $data;
$timestamp = substr($timestamp,0,10);
$oggi = date('Y-m-d');
if ($timestamp == $oggi) {
    return true;
 } else {
   return false;
}
}