Is it possible to access the user ID via a widget?

NodeBB Plugins
  • I want to access the user ID of the the logged in user and the user I'm visiting. Is this possible with a widget or do I have to write a plugin?

  • The logged in user should be app.user.uid, if you are visiting a user, the id should be

    Here's a small script for you.

    <span id="myid" style="display:none;">My uid: </span>
    <span id="theirid" style="display:none;">Their uid: </span>
    if (app.user.uid) {
    if ( {

Suggested Topics