public function completed(UserInterface $user)
    {
        $queryBuilder = $this->createQueryBuilder('a');

        $queryBuilder
            ->where('a.user = :user')
            ->andWhere('a.completed = :completed');

        $queryBuilder
            ->setParameters([
                'user' => $user,
                'completed' => true
            ]);

        try
        {
            return $queryBuilder->getQuery()->getSingleResult();
        }
        catch (NoResultException $e)
        {
            return false;
        }
    }
public function completed(UserInterface $user)
    {
        $queryBuilder = $this->createQueryBuilder('a');

        $queryBuilder
            ->where('a.user = :user')
            ->andWhere('a.completed = :completed');

        $queryBuilder
            ->setParameters([
                'user' => $user,
                'completed' => true
            ]);

        try
        {
            return $queryBuilder->getQuery()->getSingleResult();
        }
        catch (NoResultException $e)
        {
            return false;
        }
    }
public function completed ( UserInterface $ user ) { $ queryBuilder = $ this -> createQueryBuilder ( 'a' ) ; $ queryBuilder -> where ( 'a.user = :user' ) -> andWhere ( 'a.completed = :completed' ) ; $ queryBuilder -> setParameters ( [ 'user' => $ user , 'completed' => true ] ) ; try { return $ queryBuilder -> getQuery ( ) -> getSingleResult ( ) ; } catch ( NoResultException $ e ) { return false ; } }
Checks if a valid activation has been completed.

@param  \Cartalyst\Sentinel\Users\UserInterface $user

@return bool|Activation
Checks if a valid activation has been completed .