Thanks for the response, Joe. I knew it had to be easy!
However, when I try to use that method with an ASMX it doesn't recognize the logged in user. This is what I get from UserInfo:
{DotNetNuke.Entities.Users.UserInfo}
base {DotNetNuke.Entities.BaseEntityInfo}: {DotNetNuke.Entities.Users.UserInfo}
AffiliateID: -1
Cacheability: notCacheable
DisplayName: null
Email: null
FirstName: null
FullName: " "
IsDeleted: false
IsSuperUser: false
LastIPAddress: null
LastName: null
Membership: {DotNetNuke.Entities.Users.UserMembership}
PortalID: -1
Profile: {DotNetNuke.Entities.Users.UserProfile}
RefreshRoles: false
Roles: {string[0]}
UserID: -1
Username: null
It should recognize me as Host and UserID 1 since I am logged in at the same time.
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.Services;
using
DotNetNuke.Entities.Users;
using
System.Web.Script.Services;
using
DotNetNuke.Entities.Modules;
namespace
YourCompany.Modules.QuantumToolsModules
{
/// <summary>
/// Summary description for TestQuantumTools
/// </summary>
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(
false
)]
[ScriptService]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public
class
TestQuantumTools : PortalModuleBase
// System.Web.Services.WebService
{
[WebMethod]
public
string
GetUsersFrmRl(
string
AppNm,
string
SetNm,
string
Flg,
int
P_id,
int
U_id,
string
PD)
{
string
ret_str =
string
.Empty;
UserController uc =
new
UserController();
//UserInfo ui = uc.GetUser(P_id, U_id);
UserInfo ui = UserController.GetCurrentUserInfo();
return
ret_str;
}
}
}
Which was called from a $.ajax command, which we debugged after it hit the UserInfo and returned the previous block.
The lunar eclipse is winding down now, so I'm off to sleep! Not a very exciting a event, but at least I've seen one.