Plugin Directory

Changeset 3496008


Ignore:
Timestamp:
03/31/2026 09:13:49 PM (17 hours ago)
Author:
mslepko
Message:

Update to version 1.1.2

Location:
rootscope-remote-site-manager
Files:
16 added
3 edited

Legend:

Unmodified
Added
Removed
  • rootscope-remote-site-manager/trunk/includes/class-settings.php

    r3495889 r3496008  
    220220        }
    221221
    222         // Store the returned credentials
     222        // Store the returned credentials.
     223        // We bypass update_option for api_secret because WordPress calls
     224        // sanitize_option twice when the option doesn't exist yet
     225        // (once in update_option, once in the internal add_option fallback),
     226        // which double-encrypts the value.
    223227        update_option('rsadmin_api_key', sanitize_text_field($result['api_key']), false);
    224         update_option('rsadmin_api_secret', self::encrypt_api_secret($result['api_secret']), false);
     228
     229        delete_option('rsadmin_api_secret');
     230        global $wpdb;
     231        $wpdb->replace($wpdb->options, [
     232            'option_name' => 'rsadmin_api_secret',
     233            'option_value' => self::encrypt_api_secret(sanitize_text_field($result['api_secret'])),
     234            'autoload' => 'off',
     235        ]);
    225236
    226237        if (isset($result['site_id'])) {
    227238            self::set_site_id((int) $result['site_id']);
     239        }
     240
     241        // Auto-select the first administrator for one-click login
     242        if (self::get_login_user_id() === 0) {
     243            $admins = get_users(['role' => 'administrator', 'number' => 1, 'orderby' => 'ID', 'order' => 'ASC']);
     244            if (!empty($admins)) {
     245                update_option('rsadmin_login_user_id', $admins[0]->ID, true);
     246            }
    228247        }
    229248
  • rootscope-remote-site-manager/trunk/readme.txt

    r3495889 r3496008  
    44Requires at least: 6.2
    55Tested up to: 6.9
    6 Stable tag: 1.1.1
     6Stable tag: 1.1.2
    77Requires PHP: 8.0
    88License: GPLv2 or later
     
    6666
    6767== Changelog ==
     68= 1.1.2 =
     69* Fixed api secret double-encryption when option didn't exist
     70* Preselect first admin account by default
    6871
    6972= 1.1.1 =
  • rootscope-remote-site-manager/trunk/rootscope-remote-site-manager.php

    r3495889 r3496008  
    44 * Plugin URI: https://wp-admin.online
    55 * Description: Connect your WordPress site to Rootscope Remote Site Manager dashboard for centralized management
    6  * Version: 1.1.1
     6 * Version: 1.1.2
    77 * Author: Rootscope
    88 * Author URI: https://rootscope.dev
     
    1616defined('ABSPATH') || exit;
    1717
    18 define('RSADMIN_CONNECTOR_VERSION', '1.1.1');
     18define('RSADMIN_CONNECTOR_VERSION', '1.1.2');
    1919define('RSADMIN_CONNECTOR_PATH', plugin_dir_path(__FILE__));
    2020define('RSADMIN_CONNECTOR_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.