$token ]); if($user && $user->activated == 0) { $user->activated = 1; $user->verify_token = null; $success = $user->commit(); if(!$success) throw new Exception("Email verification failed. Please try again later."); Core::addAlert("success", "Email address verified. You can now log in to your account."); } else { Core::addAlert("danger", "Invalid verification token. The user account may have already been activated or the token has expired. Please try again."); } HTTP::redirect("/log-in");