SimpleSAML_XHTML_IdPDisco::getRecommendedIdP PHP Method

getRecommendedIdP() protected method

This function will first look at the previous IdP the user has chosen. If the user hasn't chosen an IdP before, it will look at the IP address.
protected getRecommendedIdP ( ) : string
return string The entity id of the IdP the user should most likely use.
    protected function getRecommendedIdP()
    {
        $idp = $this->getPreviousIdP();
        if ($idp !== null) {
            $this->log('Preferred IdP from previous use [' . $idp . '].');
            return $idp;
        }
        $idp = $this->getFromCIDRhint();
        if (!empty($idp)) {
            $this->log('Preferred IdP from CIDR hint [' . $idp . '].');
            return $idp;
        }
        return null;
    }