• I created a rest-api endpoint for user registration. On success I login the user. Problem is that since this is AJAX the user’s state doesn’t get updated unless I reload the page. This of course makes AJAX useless when it comes to registration.
    Is there any way to solve this without reloading the whole page? I basically need to show the admin bar that shows that the users is logged in.

Viewing 1 replies (of 1 total)
  • you can update the admin bar if you get success response from ajax request and also return dynamic admin bar with user logged-in details in response and replace this response with existing admin bar(Add some id this this existing bar to replace html using jquery)

    Hope this will work.

Viewing 1 replies (of 1 total)
  • The topic ‘How to update user's state after AJAX login’ is closed to new replies.