com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

Consume user information within a widget

There can be a scenario where a particular widget needs to access the user information of current logged in user. For that, an API has been introduced to the widget developer via the base widget component.

Follow the steps mentioned below to access user information. Please note that this API currently exposes only the username of the current user.

NOTE: This guide assumes that you already have a widget which is deployable in dashboard portal.

  1. Make sure your widget has extended from the based widget provided by the dashboard portal. If not please refer “Extending from base widget component”.
  2. Call the following method to get the user information.

    const userInfo = super.getCurrentUser();

A sample widget has been shipped with WSO2 Stream Processor named "UserInfo" to demonstrate this feature. You can find the source code of the sample widget at https://github.com/wso2/carbon-dashboards/tree/v4.0.8/samples/widgets/UserInfo.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.