public function getDupes(ICommunityMember $member)
 {
     list($res, $count) = $this->member_repository->getAllByName($member->getFirstName(), $member->getLastName());
     $unset = array();
     for ($i = 0; $i < count($res); $i++) {
         if ($res[$i]->getIdentifier() == $member->getIdentifier()) {
             array_push($unset, $i);
             continue;
         }
         //check merge request
         $merge_request = $this->merge_request_repository->findByDupeAccount($res[$i]->getEmail());
         if (!is_null($merge_request)) {
             array_push($unset, $i);
         }
         // check delete request
         $delete_request = $this->delete_request_repository->findByDupeAccount($res[$i]->getEmail());
         if (!is_null($delete_request)) {
             array_push($unset, $i);
         }
         // check not my account action
         $query = new QueryObject();
         $query->addAndCondition(QueryCriteria::equal('PrimaryAccountID', $member->getIdentifier()));
         $query->addAndCondition(QueryCriteria::equal('ForeignAccountID', $res[$i]->getIdentifier()));
         $action = $this->not_my_account_repository->getBy($query);
         if (!is_null($action)) {
             array_push($unset, $i);
         }
     }
     for ($j = 0; $j < count($unset); $j++) {
         $index = $unset[$j];
         unset($res[$index]);
     }
     return $res;
 }