/**
  * @deprecated Old sign-up page callback.
  */
 public function SignUpPageLoad()
 {
     if ($this->fs->is_registered()) {
         return;
     }
     if ('post' === strtolower($_SERVER['REQUEST_METHOD']) && isset($_POST['action']) && 'account' === $_POST['action']) {
         $this->SetOption(WP_RW__DB_OPTION_OWNER_ID, $_POST['user_id']);
         $this->SetOption(WP_RW__DB_OPTION_OWNER_EMAIL, $_POST['user_email']);
         $this->SetOption(WP_RW__DB_OPTION_SITE_ID, $_POST['site_id']);
         $this->SetOption(WP_RW__DB_OPTION_SITE_PUBLIC_KEY, $_POST['public_key']);
         $this->SetOption(WP_RW__DB_OPTION_SITE_SECRET_KEY, $_POST['secret_key']);
         $this->SetOption(WP_RW__DB_OPTION_TRACKING, isset($_POST['tracking']) && '1' == $_POST['tracking']);
         $this->_options->store();
         // Reload the page with the keys.
         rw_admin_redirect();
     }
 }
示例#2
0
 public function AdvancedSettingsPageLoad()
 {
     $rw_delete_history = isset($_POST["rw_delete_history"]) && in_array($_POST["rw_delete_history"], array("true", "false")) ? $_POST["rw_delete_history"] : "false";
     if ("true" === $rw_delete_history) {
         // Delete user-key & secret.
         global $wpdb;
         $ret = $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name = 'rw_user_key' OR option_name = 'rw_user_secret'");
         // Goto user-key creation page.
         rw_admin_redirect();
     }
 }