• Resolved ichhaporiaca

    (@ichhaporiaca)


    I am successfully using the feature to register new users … but only if the option “Initialize force login after register” is unchecked. If I check this option, the response is 500 Internal Server Error.

    Plugin version: 2.1.0

    My url is of the form:
    https://{{hostname}}/?rest_route=/simple-jwt-login/v1/users&AUTH_KEY={{auth-code}}
    My POST body is of the form:
    {
    “email”: “{{email}}”,
    “user_login”: “{{user-login}}”,
    “first_name”: “{{first-name}}”,
    “last_name”: “{{last-name}}”
    }

    Note that even though, the response is 500, the user DOES get created, however the user is not auto-logged in.

    More info from PHP error log:
    Uncaught Error: Call to a member function get() on int in /srv/bindings/e69f35dcbdcd44928d3e09ab315d53af/code/wp-content/plugins/simple-jwt-login/src/modules/WordPressData.php:35

    • This topic was modified 5 years, 11 months ago by ichhaporiaca.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Nicu Micle

    (@nicu_m)

    Hello,

    Thank you for reporting this issue.
    I will have a look today at this and fix it.

    Meanwhile, if you have access, can you provide me the error that is displayed in error log from your server? This will help me identify the problem faster.

    I will come back with updates.

    Best regards,
    Nicu.

    Thread Starter ichhaporiaca

    (@ichhaporiaca)

    This is the stack trace shown:

    Uncaught Error: Call to a member function get() on int in /srv/bindings/e69f35dcbdcd44928d3e09ab315d53af/code/wp-content/plugins/simple-jwt-login/src/modules/WordPressData.php:35 Stack trace: #0 /srv/bindings/e69f35dcbdcd44928d3e09ab315d53af/code/wp-content/plugins/simple-jwt-login/src/modules/SimpleJWTLoginService.php(453): SimpleJWTLogin\Modules\WordPressData->loginUser(29) #1 /srv/bindings/e69f35dcbdcd44928d3e09ab315d53af/code/wp-content/plugins/simple-jwt-login/src/modules/RouteService.php(71): SimpleJWTLogin\Modules\SimpleJWTLoginService->createUser()
    #2 /srv/bindings/e69f35dcbdcd44928d3e09ab315d53af/code/wp-content/plugins/simple-jwt-login/routes.php(52): SimpleJWTLogin\Modules\RouteService->makeAction(‘users’, ‘POST’)
    #3 /srv/bindings/e69f35dcbdcd44928d3e09ab315d53af/code/wp-includes/rest-api/class-wp-rest-server.php(1015): {closure}(Object(WP_REST_Request)) #4 /srv/bindings/e69f35dcbdcd44928d3e09ab315d53af/code/wp-includes/rest-api/class-wp-rest-server.php(342): WP_REST_Server-

    Plugin Author Nicu Micle

    (@nicu_m)

    Hello,

    I have fixed this bug. If you update your plugin to version 2.1.1, this issue should be fixed.

    Let me know if you encounter other problems.

    PS: Please don’t forget to rate this plugin.

    Best regards,
    Nicu.

    Thread Starter ichhaporiaca

    (@ichhaporiaca)

    Thank you, I can confirm that it is indeed fixed.

    Plugin Author Nicu Micle

    (@nicu_m)

    I’m glad to hear that everything is OK now.

    I will invest more time in the plugin tests so this kind of bugs will not go to production in the future releases.

    Also, Thank you for your review.

    Have a nice weekend.
    Nicu.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Initialize force login after register’ is closed to new replies.