Getting user data in static page
-
I want to get if user is logged in when viewing static page on nodebb-plugin-static-page plugin. I can get user id by calling app.uid on client side javascript, but it is not reliable, because it seems it doesn't work when page is loaded freshly, not after ajax call from other page. Are there any ways to know if user is logged in?
-
-
@dove, the event you're looking for is
$(window).on('action:connected', function() { });
app.* will be available to you after this event
-
@psychobunny Thanks, working great!
Copyright © 2024 NodeBB | Contributors