} } else { $login_output .= $createform; } } else { $login_output .= "<div class='alert alert-warning'><button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button><p>This site's ReCAPTCHA library hasn't been set up. Please contact the site administrator.</p></div>"; } } else { if ($_REQUEST['q'] == "verify") { $login_output .= $phone_verify_form; } else { if (isset($_REQUEST['confirm'])) { $token = $_REQUEST['token']; $userToActivate = $_REQUEST['user']; $encoded_key = $_REQUEST['key']; $result = $user->verifyUserAuth($encoded_key, $token, $userToActivate); if ($result['status'] === false) { $login_output .= "<div class='alert alert-warning'><button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button><h1>Could not verify user</h1><p>" . $result['message'] . "</p></div>"; } else { if ($result["admin_confirm_sent"] && $result["user_confirm_sent"]) { $messageFollowUp = "Check your inbox for a confirmation."; } else { $messageFollowUp = "<strong>However, not all confirmations could not be sent</strong> (" . $result["error"] . ")."; } $login_output .= "<div class='alert alert-info'><button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button><p>The user was successfully activated. {$messageFollowUp}</p></div>"; } if ($debug) { echo displayDebug($result); } } else { if (isset($_REQUEST['2fa'])) {
function verifyUserAuth($get) { $token = $get['token']; $userToActivate = $get['user']; $encoded_key = $get['key']; $user = new UserFunctions(); return $user->verifyUserAuth($encoded_key, $token, $userToActivate); }