When expiration time was not set but password expiration time was, and
the soonest time of the two was requested, nothing was returned. Fixed
this to return the password expiration time.
# If no type was requested, return the soonest of the two dates.
if (!$type) {
$type = 'expire';
- $type = 'pwexpire' if $pwexpire > $expire;
+ $type = 'pwexpire' if $pwexpire < $expire || $expire == 0;
}
if ($type eq 'pwexpire' && $pwexpire > 0) {
# If no type was requested, return the soonest of the two dates.
if (!$type) {
$type = 'expire';
- $type = 'pwexpire' if $pwexpire < $expire;
+ $type = 'pwexpire' if $pwexpire < $expire || $expire == 0;
}
if ($type eq 'pwexpire' && $pwexpire) {