function UserpointsTransaction::setExpiryDate in User Points 7.2
Set the expiration date of a transaction.
Setting it to a date in the past will immediatly expire the transaction.
Parameters
$expirydate: Timestamp of the expiration date.
Return value
File
- ./
userpoints.transaction.inc, line 284 - Contains the UserpointsTransaction and related classes.
Class
- UserpointsTransaction
- A Userpoints transaction.
Code
function setExpiryDate($expirydate) {
$this
->checkChange();
if ($expirydate > 0 || $expirydate === 0 || $expirydate === NULL) {
$this->expirydate = (int) $expirydate;
}
else {
$this
->abort();
throw new UserpointsInvalidArgumentException(t('Expiration date must be an integer'));
}
return $this;
}