public function deleteUserQuery($userId)
    {
        $qb = $this->createQueryBuilder();
        $qb->delete($this->getTableName());

        if (is_numeric($userId)) {
            $qb->where('id = :userId');
        } else {
            $qb->where('username = :userId')->orWhere('email = :userId');
        }
        $qb->setParameter('userId', $userId);

        return $qb;
    }
public function deleteUserQuery($userId)
    {
        $qb = $this->createQueryBuilder();
        $qb->delete($this->getTableName());

        if (is_numeric($userId)) {
            $qb->where('id = :userId');
        } else {
            $qb->where('username = :userId')->orWhere('email = :userId');
        }
        $qb->setParameter('userId', $userId);

        return $qb;
    }
public function deleteUserQuery ( $ userId ) { $ qb = $ this -> createQueryBuilder ( ) ; $ qb -> delete ( $ this -> getTableName ( ) ) ; if ( is_numeric ( $ userId ) ) { $ qb -> where ( 'id = :userId' ) ; } else { $ qb -> where ( 'username = :userId' ) -> orWhere ( 'email = :userId' ) ; } $ qb -> setParameter ( 'userId' , $ userId ) ; return $ qb ; }
Get the user deletion query.

@param string|int $userId

@return QueryBuilder
Get the user deletion query .