Hello,
I apologise for the poor obsolete text, those methods should detail the new API methods to use - however if you look at the internals you'll notice that they do call the relevant new bits
[Obsolete("Deprecated in DotNetNuke 6.2.")]
public static bool DeleteUserRole(int userId, RoleInfo role, PortalSettings portalSettings, bool notifyUser)
{
UserInfo objUser = UserController.GetUserById(portalSettings.PortalId, userId);
return DeleteUserRole(objUser, role, portalSettings, notifyUser);
}
[Obsolete("Deprecated in DotNetNuke 6.2.")]
public static bool DeleteUserRole(int roleId, UserInfo user, PortalSettings portalSettings, bool notifyUser)
{
RoleInfo role = TestableRoleController.Instance.GetRole(portalSettings.PortalId, r => r.RoleID == roleId);
return DeleteUserRole(user, role, portalSettings, notifyUser);
}
[Obsolete("Deprecated in DotNetNuke 6.2.")]
public bool DeleteUserRole(int portalId, int userId, int roleId)
{
return DeleteUserRoleInternal(portalId, userId, roleId);
}
you'll notice that the first two use the new API as expected (the 3rd uses an internal method as it's particularly old). The API method you should use is -if it's reporting that the first item should be an int then you are not calling the method with the correct 4 parameters and it's trying to use one of the old obsolete methods
public static bool DeleteUserRole(UserInfo objUser, RoleInfo role, PortalSettings portalSettings, bool notifyUser)