Security/User/LdapUser.php
public function isAccountNonExpired()
    {
        if (!$this->has('accountExpirationDate') || $this->get('accountExpirationDate') === false) {
            $result = true;
        } elseif ($this->get('accountExpirationDate') instanceof \DateTime) {
            $result = ($this->get('accountExpirationDate') > new \DateTime());
        } else {
            $result = (bool) $this->get('accountExpirationDate');
        }

        return $result;
    }
public function isAccountNonExpired()
    {
        if (!$this->has('accountExpirationDate') || $this->get('accountExpirationDate') === false) {
            $result = true;
        } elseif ($this->get('accountExpirationDate') instanceof \DateTime) {
            $result = ($this->get('accountExpirationDate') > new \DateTime());
        } else {
            $result = (bool) $this->get('accountExpirationDate');
        }

        return $result;
    }
{@inheritdoc}