diff --git a/modules/discopower/lib/PowerIdPDisco.php b/modules/discopower/lib/PowerIdPDisco.php
index c8493a07d4ed35b6ce0619bf087ae9a77a04b33a..cbfa86270920e45f91cc51eac672ea027e5b64b9 100644
--- a/modules/discopower/lib/PowerIdPDisco.php
+++ b/modules/discopower/lib/PowerIdPDisco.php
@@ -247,13 +247,6 @@ class PowerIdPDisco extends \SimpleSAML\XHTML\IdPDisco
         $idpList = $this->idplistStructured($this->filterList($idpList));
         $preferredIdP = $this->getRecommendedIdP();
 
-        $faventry = null;
-        foreach ($idpList AS $tab => $slist) {
-            if (!empty($preferredIdP) && array_key_exists($preferredIdP, $slist)) {
-                $faventry = $slist[$preferredIdP];
-            }
-        }
-
         $t = new \SimpleSAML\XHTML\Template($this->config, 'discopower:disco.tpl.php', 'disco');
         $discoPowerTabs = array(
             'denmark' => \SimpleSAML\Locale\Translate::noop('{discopower:tabs:denmark}'),