Plugin Directory

Changeset 2914372


Ignore:
Timestamp:
05/18/2023 03:47:43 PM (3 years ago)
Author:
parorrey
Message:

Updating version 3.9.2

Location:
json-api-user/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • json-api-user/trunk/controllers/User.php

    r2769934 r2914372  
    3838
    3939        return array(
    40                 "version" => JAU_VERSION               
     40                "version" => JAU_VERSION,
     41                "php" => PHP_VERSION               
    4142           );     
    4243
     
    363364public function validate_auth_cookie() {
    364365
    365         global $json_api;
    366 
    367         if (!$json_api->query->cookie) {
    368 
    369             $json_api->error("You must include a 'cookie' authentication cookie. Use the `create_auth_cookie` method.");
    370 
    371         }       
    372 
    373         $valid = wp_validate_auth_cookie($json_api->query->cookie, 'logged_in') ? true : false;
    374 
    375         return array(
    376 
    377             "valid" => $valid
    378 
    379         );
    380 
    381     }
     366    global $json_api;
     367
     368
     369    if ( !$json_api->query->cookie ) {
     370
     371      $json_api->error( "You must include a 'cookie' authentication cookie. Use the `generate_auth_cookie` method." );
     372
     373    }
     374     
     375     $user_id =  wp_validate_auth_cookie( $json_api->query->cookie, 'logged_in' );
     376
     377    $valid = $user_id ? true : false;
     378
     379    return array(
     380
     381      "valid" => $valid,
     382      "user_id" =>$user_id
     383
     384    );
     385
     386  }
    382387
    383388public function generate_auth_cookie() {
  • json-api-user/trunk/json-api-user.php

    r2879177 r2914372  
    99  Description: Extends the JSON API for RESTful user registration, authentication, password reset, Facebook Login, user meta and BuddyPress Profile related functions. A Pro version is also available.
    1010
    11   Version: 3.9.1
     11  Version: 3.9.2
    1212
    1313  Author: Ali Qureshi
     
    1919 */
    2020
    21 define('JAU_VERSION', '3.9.1');
     21define('JAU_VERSION', '3.9.2');
    2222
    2323include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
  • json-api-user/trunk/readme.txt

    r2879177 r2914372  
    44Tags: json api, RESTful user registration, authentication, RESTful Facebook Login, RESTful User Meta and BuddyPress xProfile
    55Contributors: parorrey
    6 Stable tag: 3.9.1
     6Stable tag: 3.9.2
    77Requires at least: 3.0.1
    88Tested up to: 6.1.1
     
    233233== Changelog ==
    234234
     235= 3.9.2 =
     236* Fixed a bug for validate_auth_cookie endpoint and error message
     237
    235238= 3.9.1 =
    236239* Updated for wordpress version 6.1.1
Note: See TracChangeset for help on using the changeset viewer.