Confirmed emails are set to expired

Created on 5 September 2019, over 5 years ago
Updated 13 December 2023, about 1 year ago

Hi,

I've noticed that confirmed and cancelled email confirmations are set to expired when try to getStatus() when they pass the time set up in the UI.

Changing the order of the condition solves this issue:
Before:

 public function getStatus() {
    if ($this->isExpired()) {
      $status = 'expired';
    }
    elseif ($this->isCancelled()) {
      $status = 'cancelled';
    }
    elseif ($this->isConfirmed()) {
      $status = 'confirmed';
    }
    else {
      $status = 'pending';
    }

    return $status;
  }

After:

  public function getStatus() {
    if ($this->isCancelled()) {
      $status = 'cancelled';
    }
    elseif ($this->isConfirmed()) {
      $status = 'confirmed';
    }
    elseif ($this->isExpired()) {
        $status = 'expired';
    }
    else {
      $status = 'pending';
    }

    return $status;
  }
📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom lexsoft00

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024