get_options(); if (isset($form['redeem-account'])){ //login if ($plugin->login($form["email"], $form["password"])){ $url = $plugin->getURL("home"); $url = $plugin->getURL("home"); echo "

Your site is now attached to 40Nuggets.

Click here to manage your account.

"; exit; }else{ echo "

Login Failed

"; showLoginForm($form["email"], $options->api_key); } }else if (isset($form['simply-add-code'])){ //save client ID $plugin->set_api_key($form['api_key']); $options = $plugin->get_options(); echo "

Your site is now attached to 40Nuggets.

Click here to manage your account.

"; exit; }else{ $email = get_option('admin_email'); try { $file = plugin_dir_path(__FILE__) . 'fortynuggets.key'; if (file_exists($file)){ $data = json_decode(file_get_contents($file)); $email = $data->email; } }catch(Exception $e) {} showLoginForm($email, $options->api_key); } function showLoginForm($email, $api_key){ ?>

Attach your site to an existing account

If you already have an existing account just enter your login and password below.


Forgot your password?

Or manually add your account ID