Plugin Directory

Changeset 1946150


Ignore:
Timestamp:
09/24/2018 01:56:44 PM (8 years ago)
Author:
Unisender Inc
Message:

2.0.6. Removed login field from autorisation menu

Location:
unisender-integration/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • unisender-integration/trunk/class/UnisenderActivation.php

    r1200288 r1946150  
    99            return;
    1010        }
    11         if (!get_option('unisender_api_key') || !get_option('unisender_login')) {
     11        if (!get_option('unisender_api_key')) {
    1212            add_management_page(
    1313                'Unisender Integration',
     
    8181    public function actionLogin()
    8282    {
    83         if (empty($_POST['api_key']) || empty($_POST['login'])) {
     83        if (empty($_POST['api_key'])) {
    8484            die(self::setResponse(false, __('Not all required fields are filled', $this->textdomain)));
    8585        }
    8686
    8787        $apiKey = $_POST['api_key'];
    88         $login  = $_POST['login'];
    89 
    90         $api    = UnisenderApi::getInstance($apiKey, $login);
     88
     89        $api    = UnisenderApi::getInstance($apiKey);
    9190        $result = $api->getUserInfo();
    9291        if ($result['status'] === 'success') {
    9392            update_option('unisender_api_key', $apiKey);
    94             update_option('unisender_login', $login);
    9593
    9694            UnisenderContactList::actionSync(1);
  • unisender-integration/trunk/class/UnisenderApi.php

    r1590989 r1946150  
    1212
    1313    private $apiKey;
    14     private $login;
    15 
    16     protected function __construct($apiKey, $login)
     14
     15    protected function __construct($apiKey)
    1716    {
    1817        $this->apiKey = $apiKey;
    19         $this->login = $login;
    2018    }
    2119
    2220    /**
    2321     * @param mixed $apiKey
    24      * @param mixed $login
    2522     *
    2623     * @return null|UnisenderApi
    2724     */
    28     public static function getInstance($apiKey = null, $login = null)
     25    public static function getInstance($apiKey = null)
    2926    {
    3027        if (self::$instance === null) {
    31             if (!$apiKey && !$login) {
     28            if (!$apiKey) {
    3229                $apiKey = get_option('unisender_api_key');
    33                 $login  = get_option('unisender_login');
    34             }
    35 
    36             if ($apiKey === null || $login === null) {
     30            }
     31
     32            if ($apiKey === null) {
    3733                return null;
    3834            }
    3935
    40             self::$instance = new self($apiKey, $login);
     36            self::$instance = new self($apiKey);
    4137        }
    4238
     
    138134        $method = 'getUserInfo';
    139135        $params['api_key'] = $this->apiKey;
    140         $params['login'] = $this->login;
    141136
    142137        $response = self::exec($method, $params);
  • unisender-integration/trunk/readme.txt

    r1674371 r1946150  
    33Contributors: UniSender Inc
    44Tags: рассылка, рассылки, программа для имейл рассылки, имейл рассылка, email рассылка, e-mail рассылка, массовая рассылка, e mail рассылка, unisender, юнисендер
    5 Stable tag: 2.0.5
    6 Tested up to: 4.7.5
     5Stable tag: 2.0.6
     6Tested up to: 4.9.8
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6262== Changelog ==
    6363
     642.0.6
     65
     661. Убрано поле Login из формы авторизации.
     67
    64682.0.5
    6569
  • unisender-integration/trunk/tpl/Activation/login_form.php

    r1200288 r1946150  
    33    <input name="action" type="hidden" value="unisender_login">
    44    <table class="form-table">
    5         <tr class="form-field">
    6             <th scope="row">
    7                 <span class="description">*</span> <label for="login"><?php _e('Login', $this->textdomain); ?></label>
    8             </th>
    9             <td>
    10                 <input name="login" type="text" id="login" value="" aria-required="true"
    11                        placeholder="<?php _e('Login', $this->textdomain)?>" required>
    12             </td>
    13         </tr>
    145        <tr class="form-field">
    156            <th scope="row">
Note: See TracChangeset for help on using the changeset viewer.