public function expirationDate()
    {
        $accountExpiry = $this->getAccountExpiry();

        // If the account expiry is zero or the expiry is equal to
        // ActiveDirectory's 'never expire' value,
        // then we'll return null here.
        if ($accountExpiry == 0 || $accountExpiry == $this->getSchema()->neverExpiresDate()) {
            return;
        }

        $unixTime = Utilities::convertWindowsTimeToUnixTime($accountExpiry);

        return (new DateTime())->setTimestamp($unixTime);
    }
public function expirationDate()
    {
        $accountExpiry = $this->getAccountExpiry();

        // If the account expiry is zero or the expiry is equal to
        // ActiveDirectory's 'never expire' value,
        // then we'll return null here.
        if ($accountExpiry == 0 || $accountExpiry == $this->getSchema()->neverExpiresDate()) {
            return;
        }

        $unixTime = Utilities::convertWindowsTimeToUnixTime($accountExpiry);

        return (new DateTime())->setTimestamp($unixTime);
    }
public function expirationDate ( ) { $ accountExpiry = $ this -> getAccountExpiry ( ) ; // If the account expiry is zero or the expiry is equal to // ActiveDirectory's 'never expire' value, // then we'll return null here. if ( $ accountExpiry == 0 || $ accountExpiry == $ this -> getSchema ( ) -> neverExpiresDate ( ) ) { return ; } $ unixTime = Utilities :: convertWindowsTimeToUnixTime ( $ accountExpiry ) ; return ( new DateTime ( ) ) -> setTimestamp ( $ unixTime ) ; }
Return the expiration date of the user account.

@return DateTime|null

@throws \Exception
Return the expiration date of the user account .