I'm trying to get the current logged in user once they've reached my app hosted on our DotNetNuke page. The app is built in React.JS, and I'm rending it inside the HTML module. When the user reaches the app, I'm doing a ComponentDidMount method call, and initiating a AJAX request to my .ascx file to get the current user. (ComponentDidMount gets invoked automatically only once, when the app is loaded -- For all the .NET people reading this). Once in the ASCX file, I'm executing the code below, but only get the output of "user ". Am I supposed to call a class to use this token in another file ? What can I do in my code below to get the current user logged in to the site (DNN does not use session variables sadly, only tokens).
.ascx Code:
<%
Response.Write("user " & [User:UserName])
%>