This will be available in 1.18.4 https://github.com/NodeBB/NodeBB/issues/9845
Get UID
-
I'm trying to modify the shoutbox plugin a bit, so I can style own shouts differently. Therefore, I need the current users UID, so I can do something like
if (shout.fromuid === app.uid) { // add custom class in template }
Now I tried different variables which I saw at other points in the code (
app.uid
) or work in the developer console (app.user.uid
) But they are bothundefined
.Any hints on how to get the UID?
Disclaimer: I'm a noob with JS. But I learn, so bare with me
-
Client side
app.user.uid
should be defined. Where are you trying to call it? -
Inside of the client script... Anyway, I just restarted NodeBB and tried it again, it works fine now
Thank you!