prepare( "SELECT u.user_id, u.email, u.verify_expires_at, c.company_name FROM user u JOIN company_map_user m ON m.user_id = u.user_id JOIN company_list c ON c.company_id = m.company_id WHERE u.verify_token = :token AND u.status = 'pending' AND u.license = 'user' LIMIT 1" ); $sth->execute([':token' => $token]); $row = $sth->fetch(PDO::FETCH_ASSOC); // Determine error state: cancelled (no row) or expired (row found but past expiry) $invite_error = null; if (!$row) { $invite_error = 'cancelled'; } elseif (strtotime($row['verify_expires_at']) <= time()) { $invite_error = 'expired'; } if ($invite_error) { require '../include_header.php'; $msg = $invite_error === 'expired' ? ['icon' => 'ti-clock-x', 'title' => 'Invitation Expired', 'body' => 'This invitation link has expired. Please contact your administrator to send a new invitation.'] : ['icon' => 'ti-user-x', 'title' => 'Invitation Cancelled', 'body' => 'This invitation has been cancelled. Please contact your administrator if you believe this is a mistake.']; ?>

You've been invited!

Complete your account setup to join .

Account Setup

Your email:

Used to log in. Cannot be changed later.
—
Minimum required strength: Strong (3/4)