validation_code == $_GET["vcode"]) { $st = $db->conn->prepare("UPDATE members SET validated=true WHERE userid = ?"); $success = $st->execute(array($m->userid)); if ($success) { $success_alerts[] = 'Successfully validated your email address, Continue'; } else { $einfo = $st->errorInfo(); error_log("mcoop: validate.php failed updating members: " . var_export($einfo, true) . " ($m->userid)"); $danger_alerts[] = "Failed to update the database to validate your email address, this is an internal error, please contact the admin"; } } else { $danger_alerts[] = "Unable to validate email: incorrect validation code"; } } catch (UnknownMember $un) { $danger_alerts[] = "Unable to validate email: no such user"; } } echo $twig->render("validate.tmpl", array( "danger_alerts" => $danger_alerts, "success_alerts" => $success_alerts, "sess_info" => $sess_info, "vattempted" => $vattempted )); ?>