ne notifier que sur les messages des groupes de travail et non sur les groupes fonctionnels (fixes #34)
This commit is contained in:
parent
3b0ac28df9
commit
e553a9fdeb
|
@ -54,6 +54,7 @@ class CountMessageCommand extends Command
|
||||||
foreach($user->getGroups() as $usergroup) {
|
foreach($user->getGroups() as $usergroup) {
|
||||||
// On calcule le nombre de message non lu pour l'utilisateur'
|
// On calcule le nombre de message non lu pour l'utilisateur'
|
||||||
$group=$usergroup->getGroup();
|
$group=$usergroup->getGroup();
|
||||||
|
if($group->getFgcanshare()) {
|
||||||
$qb = $this->em->createQueryBuilder();
|
$qb = $this->em->createQueryBuilder();
|
||||||
$tm = $qb ->select($qb->expr()->count('m.id'))
|
$tm = $qb ->select($qb->expr()->count('m.id'))
|
||||||
->from('CadolesWebsocketBundle:Message', 'm')
|
->from('CadolesWebsocketBundle:Message', 'm')
|
||||||
|
@ -89,7 +90,7 @@ class CountMessageCommand extends Command
|
||||||
$message = $this->container->get('cadoles.core.service.mail');
|
$message = $this->container->get('cadoles.core.service.mail');
|
||||||
$message->sendEmail($template, $mail_params, $user->getEmail(), $this->noreply, $this->appname);
|
$message->sendEmail($template, $mail_params, $user->getEmail(), $this->noreply, $this->appname);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$this->writeln('');
|
$this->writeln('');
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue