Discourse Meta
Import the User class instead of using User
מפתח
Falco
(Falco)
23 בינואר, 2020, 11:27pm
2
Change
var currentUser = Discourse.User.current();
to
var currentUser = api.getCurrentUser();
הצגת פוסט בנושא
נושאים קשורים
נושא
תגובות
צפיות
פעילות
How to find out if user logged in
Product Support
5
1307
3 באוקטובר, 2020
Import Category class in a component
Development
2
1178
13 בינואר, 2020
Set current User in Javascript
Development
6
3270
18 בספטמבר, 2017
Deprecation notice: Import getURL
Product Support
1
569
13 ביולי, 2020
Modernizing inline script tags for templates & JS API
Development
dev-news
46
6306
25 במרץ, 2026