Plugin Directory

Changeset 2983330


Ignore:
Timestamp:
10/25/2023 12:48:00 AM (2 years ago)
Author:
ehops32
Message:

1.2.3

  • Adding support to check the WP SMTP mail plugin to make sure Google is authorized
  • Confirmed user logins and user lists are functioning
Location:
sackson-web-data/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sackson-web-data/trunk/README.txt

    r2902827 r2983330  
    55Requires at least: 3.0.1
    66Tested up to: 6.0
    7 Stable tag: 1.2.1
     7Stable tag: 1.2.3
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    5050
    5151== Changelog ==
     52
     53= 1.2.3 =
     54* Adding support to check the WP SMTP mail plugin to make sure Google is authorized
     55* Confirmed user logins and user lists are functioning
     56
     57= 1.2.2 =
     58* Adding FSDIRECT if not defined
     59* Fixing a bug related to accessing a value of type bool
    5260
    5361= 1.2.1 =
  • sackson-web-data/trunk/includes/class-sacksonweb-data-helper.php

    r2902827 r2983330  
    7070        if ( $force_collect || $this->is_time_to_collect_data() ) {
    7171                       
    72             /* If the user has specified the settings to allow it, then also send_data to remote server. */ 
     72            /* If the user has specified the settings to allow it, then also send_data to remote server. */
    7373            // $sw_option = get_option('sacksonweb_premium_settings_option_name');
    74             if ( null !== $sw_option && null !== $sw_option['allow_1'] && 'Yes' == $sw_option['allow_1'] )
     74            if ( null !== $sw_option && isset($sw_option['allow_1']) && null !== $sw_option['allow_1'] && 'Yes' == $sw_option['allow_1'] )
    7575            {
    7676                $this->collect_data(); // Will populate $this->collected_data
     
    124124     *
    125125     */
    126     public function collect_data () {
    127        
     126    public function collect_data ()
     127    {
     128        // Core variables like version and site url
    128129        $this->collected_data['hs_ver'] = SACKSONWEB_DATA_VERSION;
    129130        $this->collected_data['site_url'] = get_site_url();    // get_site_url, i.e. https://mm.ericandtammy.com
    130131        $this->collected_data['web_key'] = Sacksonweb_Data_Misc::get_unique_url();
    131132
     133        // Server info
    132134        $this->collected_data['HTTP_REFERER'] = isset($_SERVER['HTTP_REFERER']) ? '' . Sacksonweb_Data_Misc::sacksonweb_sanitize_validate_escape($_SERVER['HTTP_REFERER'], 'sanitize') : '';
    133135        $this->collected_data['HTTP_HOST'] = isset($_SERVER['HTTP_HOST']) ? '' . Sacksonweb_Data_Misc::sacksonweb_sanitize_validate_escape($_SERVER['HTTP_HOST'], 'sanitize') : '';
     
    138140        $this->collected_data['WP_DEBUG_LOG'] = WP_DEBUG_LOG ? 'y' : 'n';
    139141        $this->collected_data['WP_DEBUG_DISPLAY'] = WP_DEBUG_DISPLAY ? 'y' : 'n';
     142        if ( !defined(FS_METHOD) )
     143        {
     144            //define("FS_METHOD", null);
     145        }
    140146        $this->collected_data['FS_METHOD'] =  defined(FS_METHOD) && (null !== FS_METHOD) ? FS_METHOD : '';
    141147       
     
    305311            'comment_registration', 'comment_moderation', 'comment_previously_approved',
    306312            'auto_plugin_theme_update_emails', 'cron', 'auto_update_plugins', 'worker_migration_version', 'recently_activated', 'timezone_string',
    307             'itsec-storage'
     313            'itsec-storage', 'wp_mail_smtp'
    308314        );
     315
     316        // if ($this->isWPSMTPPluginActive())
     317        // {
     318        //     $fields[] = 'wp_mail_smtp';
     319        // }
    309320
    310321        foreach ($fields as $field) {
     
    314325            }
    315326            else {
    316                 $this->collected_data[$field] = get_option($field);
     327                $option_data = get_option($field);
     328                if ( $option_data )
     329                    $this->collected_data[$field] = $option_data;
    317330            }
    318331        }
     
    347360        $plugins = rtrim($plugins, '|');
    348361        $this->collected_data['plugins'] = $plugins;
     362    }
     363
     364    function debug_to_console($data) {
     365        $output = $data;
     366        if (is_array($output))
     367            $output = implode(',', $output);
     368   
     369        echo "<script>console.log('Debug Objects: " . $output . "' );</script>";
    349370    }
    350371
     
    361382        foreach ( $users as $user )
    362383        {
     384            // $this->debug_to_console($user->user_nice_name);
     385            // $this->debug_to_console($user->display_name);
    363386            //$DBRecord[$i]['role']           = "Subscriber";
    364387            $DBRecord[$i]['WPId']           = $user->ID;
     
    367390            $DBRecord[$i]['RegisteredDate'] = $user->user_registered;
    368391            $DBRecord[$i]['Email']          = $user->user_email;
     392            $DBRecord[$i]['DisplayName']    = $user->display_name;
     393            $DBRecord[$i]['UserNiceName']    = $user->user_nice_name;
    369394
    370395            //$UserData                       = get_user_meta( $user->ID );
     
    374399            $i++;
    375400        }
     401
     402       
     403        // require_once("../../../../wp-load.php");
     404        // $headers = array('Content-Type: text/html; charset=UTF-8');
     405        // wp_mail('eric@sacksonweb.com', 'user_list', print_r($DBRecord, true), $headers);
     406        //echo '#';
     407         
    376408        $this->collected_data['user_list'] =  json_encode($DBRecord);
    377409    }
     
    439471    }
    440472
     473    /**
     474     * is wp-mail-smtp listed in the site active_plugins
     475     */
     476    function isWPSMTPPluginActive( )
     477    {
     478        if ( isset($this->collected_data['active_plugins']) )
     479        {
     480            foreach ( $this->collected_data['active_plugins'] as $plugin )
     481            {
     482                if ( str_contains($plugin,'wp-mail-smtp'))
     483                {
     484                    return true;
     485                }
     486            }
     487        }
     488        return false;
     489    }
     490
    441491
    442492    /**
     
    456506    }
    457507
    458     /**
    459      *
     508   
     509    /**
     510     * Get user log in data - wp_mail_smtp
     511     */
     512    function getWPSMTPData( )
     513    {
     514        // // If WP SMTP isn't active don't return any data.
     515        // if ( isset($this->collected_data['active_plugins']) && !$this->isWPSMTPPluginActive()  )
     516        // {
     517        //     return;
     518        // }
     519
     520        // global $wpdb;
     521
     522        // $smtp_table = $wpdb->prefix . 'simple_history';
     523       
     524        // //SELECT * FROM `wp_kwyg9knqba_simple_history` ORDER BY `id` DESC
     525
     526
     527    }
     528
     529
     530    /**
     531     * Get user log in data from the simple history table called something_simple_history
    460532     */
    461533    function getSimpleHistoryLastLoginData( )
    462534    {
     535        // If simple history isn't active don't return any data.
    463536        if ( isset($this->collected_data['active_plugins']) && !$this->isSimpleHistoryPluginActive()  )
    464537        {
     
    473546        if ( $this->doAllTheseDatabaseTablesExist(array($simple_history_context_table, $simple_history_table)) )
    474547        {       
     548            $this->debug_to_console('they do exist');
    475549            //echo '<script>alert("Yes")</script>';
    476550            /*
     
    485559            ";
    486560
    487             //wp_mail('sw@homesnaps.com', 'query sample', "Q:" + $query);
     561           // wp_mail('sw@homesnaps.com', 'query sample', "Q:" + $query);
    488562
    489563            $rows = $wpdb->get_results($query);
     
    493567                $last_logins[] = array($row->date, $row->value);
    494568            }
     569           
    495570            $this->collected_data['last_logins'] = json_encode($last_logins);
    496571        }
  • sackson-web-data/trunk/includes/class-sacksonweb-data.php

    r2802983 r2983330  
    6969     */
    7070    public function __construct() {
     71
    7172        if ( defined( 'SACKSONWEB_DATA_VERSION' ) ) {
    7273            $this->version = SACKSONWEB_DATA_VERSION;
  • sackson-web-data/trunk/sacksonweb-data.php

    r2902827 r2983330  
    1010 *
    1111 * @link              http://data.sacksonweb.com/author
    12  * @since             1.2.1
     12 * @since             1.2.3
    1313 * @package           Sacksonweb_Data
    1414 *
     
    1717 * Plugin URI:        http://data.sacksonweb.com
    1818 * Description:       A tool to monitor security issues, performance issues, and Wordpress settings that should be changed.
    19  * Version:           1.2.1
     19 * Version:           1.2.3
    2020 * Author:            Eric Thornton
    2121 * Author URI:        http://data.sacksonweb.com/author
     
    3535 *
    3636 */
    37 define( 'SACKSONWEB_DATA_VERSION', '1.2.1' );
     37define( 'SACKSONWEB_DATA_VERSION', '1.2.3' );
    3838
    3939/**
Note: See TracChangeset for help on using the changeset viewer.