Plugin Directory

Changeset 1766762


Ignore:
Timestamp:
11/15/2017 08:01:19 AM (8 years ago)
Author:
unloqer
Message:

2.1.17

  • Fixed an issue where the application name was not correctly sent
Location:
unloq/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • unloq/trunk/autoloader/admin/class-admin.php

    r1765673 r1766762  
    690690            $errors = __('Please enter a valid email', 'unloq');
    691691        }
     692        $applicationName = get_bloginfo('name');
     693        if(!isset($applicationName) || $applicationName == '') {
     694            $applicationName = 'WP Site';
     695        }
    692696        if ($errors === false) {
    693697            $remote = wp_remote_post(self::$API_url . '/connect', array(
     
    697701                'body' => json_encode(array(
    698702                    'url' => get_bloginfo('url'),
    699                     'application_name' => get_bloginfo('name') || 'WP Site',
     703                    'application_name' => $applicationName,
    700704                    'site_email' => $c_user->user_email,
    701705                    'unloq_email' => $email,
     
    747751            $errors = __('Please enter a valid email', 'unloq');
    748752        }
    749 
     753        $applicationName = get_bloginfo('name');
     754        if(!isset($applicationName) || $applicationName == '') {
     755            $applicationName = 'WP Site';
     756        }
    750757        $remote = wp_remote_post(self::$API_url . '/verify', array(
    751758            'headers' => array(
     
    754761            'body' => json_encode(array(
    755762                'url' => get_bloginfo('url'),
    756                 'application_name' => get_bloginfo('name') || 'WP Site',
     763                'application_name' => $applicationName,
    757764                'site_email' => $c_user->user_email,
    758765                'unloq_email' => $email,
     
    846853
    847854        $errors = false;
    848         $application_name = $this->utility->rgar($_POST, 'application_name') || 'WP Site';
     855        $application_name = $this->utility->rgar($_POST, 'application_name', 'WP Site');
    849856        $push_message = $this->utility->rgar($_POST, 'push_message');
    850857        $authentication_message = $this->utility->rgar($_POST, 'authentication_message');
     
    855862            ),
    856863            'body' => json_encode(array(
    857                 'application_name' => $application_name || 'WP Site',
     864                'application_name' => $application_name,
    858865                'push_message' => $push_message,
    859866                'authentication_message' => $authentication_message
     
    868875            } else {
    869876                $store_data = $this->utility->wp_option('update', 'unloq_settings', array_merge($this->settings, array(
    870                     'application_name' => $application_name || 'WP Site',
     877                    'application_name' => $application_name,
    871878                    'push_message' => $push_message,
    872879                    'authentication_message' => $authentication_message
  • unloq/trunk/readme.txt

    r1765675 r1766762  
    119119
    120120== Changelog ==
     121= 2.1.17 =
     122* Fixed an issue where the application name was not correctly sent
    121123= 2.1.16 =
    122124* Login redirect filter now uses the default "login_redirect"
  • unloq/trunk/unloq.php

    r1765675 r1766762  
    33 * Plugin Name:       UNLOQ Authentication
    44 * Description:       Perform UNLOQ.io authentications with the click of a button
    5  * Version:           2.1.16
     5 * Version:           2.1.17
    66 * Author:            UNLOQ.io
    77 * Author URI:        https://unloq.io
     
    1818
    1919define('UQ_PLUGIN', 'unloq');
    20 define('UQ_VERSION', '2.1.16');
     20define('UQ_VERSION', '2.1.17');
    2121define('UQ_VENDORS', plugin_dir_url(__FILE__) . 'vendors');
    2222define('UQ_VENDORS_DIR', plugin_dir_path(__FILE__) . 'vendors');
Note: See TracChangeset for help on using the changeset viewer.