Your question has been submitted and is awaiting moderation.
Thank you for reporting this content, moderators have been notified of your submission.
Hi, I'm new in development dotnetnuke. I have a child portal and I put some modules that I developed including a module with some services made with Web API, but I'm having problem getting the current user id. Used
Entities.Users.UserController.GetCurrentUserInfo().UserID
but in the modules it returns -1 so my module fails. After researching I fixed using
ModuleContext.PortalSettings.UserId
but the same problem is facing the Web API module and I don't know how can i fixed because there is no ModuleContext property or equivalent in the class controller. How I can retrieve the user Id in a Web API service controller that is been consumed by a child portal?
I Hope you can help me, Thank you