Skip to content

Commit

Permalink
Merge pull request #5 from PROCERGS/issue#4
Browse files Browse the repository at this point in the history
Fixes email badge
  • Loading branch information
guilhermednt authored Sep 27, 2016
2 parents 177241d + 952095d commit 5bae948
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/nbproject
/.idea
/.project
/.buildpath
/.settings/
3 changes: 1 addition & 2 deletions Event/BadgesSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected function checkCpf(EvaluateBadgesEvent $event)
protected function checkEmail(EvaluateBadgesEvent $event)
{
$person = $event->getPerson();
if ($person->getEmailConfirmedAt() instanceof \DateTime && !$person->getConfirmationToken()) {
if ($person->getEmailConfirmedAt() instanceof \DateTime) {
$event->registerBadge($this->getBadge('valid_email', true));
}
}
Expand Down Expand Up @@ -99,7 +99,6 @@ protected function countValidEmail()
return $this->em->getRepository('LoginCidadaoCoreBundle:Person')
->createQueryBuilder('p')
->select('COUNT(p)')
->andWhere('p.confirmationToken IS NULL')
->andWhere('p.emailConfirmedAt IS NOT NULL')
->getQuery()->getSingleScalarResult();
}
Expand Down

0 comments on commit 5bae948

Please sign in to comment.