Skip to content
Advertisement

WordPress $current_user returning blank

I’m trying to work with sessions in WordPress, it works when I login for the first time, but if I logout and login again the $current_user->user_login returns blank, can anyone help?

JavaScript

Advertisement

Answer

it looks like i was using the wrong hooks, i changed the code and now its working, leaving the code here if someone need.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement