-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- New feature Auto Update Existing users when UserName already exists
- Loading branch information
Showing
13 changed files
with
188 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Data; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Net.Mail; | ||
using System.Text; | ||
using System.Text.RegularExpressions; | ||
using System.Web; | ||
using System.Web.Configuration; | ||
using DotNetNuke.Entities.Users; | ||
using DotNetNuke.Entities.Portals; | ||
|
||
namespace forDNN.Modules.UsersExportImport.Models | ||
{ | ||
public class ExportInfo | ||
{ | ||
public int ExportFileType { get; set; } | ||
public bool IncludeSuperUsers { get; set; } | ||
public bool IncludeDeleted { get; set; } | ||
public bool IncludeNonAuthorised { get; set; } | ||
public bool ExportRoles { get; set; } | ||
public bool ExportPasswords { get; set; } | ||
public string PropertiesToExport { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using DotNetNuke.Web.Api; | ||
using DotNetNuke.Security; | ||
using System.Net; | ||
using System.Net.Http; | ||
using System.Web.Http; | ||
|
||
namespace forDNN.Modules.UsersExportImport.WebApi | ||
{ | ||
[SupportedModules("forDNN.UsersExportImport")] | ||
public class ExportImportController : DnnApiController | ||
{ | ||
[HttpPost] | ||
[ActionName("DoExport")] | ||
[ValidateAntiForgeryToken] | ||
[DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.View)] | ||
public HttpResponseMessage DoExport([FromBody]Models.ExportInfo objValues) | ||
{ | ||
try | ||
{ | ||
return Request.CreateResponse(HttpStatusCode.OK, Controller.ExportController.DoExport(this.PortalSettings.PortalId, objValues)); | ||
} | ||
catch (System.Exception ex) | ||
{ | ||
DotNetNuke.Services.Exceptions.Exceptions.LogException(ex); | ||
return Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message); | ||
} | ||
} | ||
|
||
[HttpPost] | ||
[ActionName("DoImport")] | ||
[ValidateAntiForgeryToken] | ||
[DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.View)] | ||
public HttpResponseMessage DoImport() | ||
{ | ||
try | ||
{ | ||
string LocalResourceFile = CommonController.ResolveUrl("App_LocalResources/MainControl", true); | ||
string Result = CommonController.DoImport(this.PortalSettings, LocalResourceFile, this.UserInfo); | ||
return Request.CreateResponse(HttpStatusCode.OK, Result); | ||
} | ||
catch (System.Exception ex) | ||
{ | ||
DotNetNuke.Services.Exceptions.Exceptions.LogException(ex); | ||
return Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message); | ||
} | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using DotNetNuke.Web.Api; | ||
|
||
namespace forDNN.UsersExportImport.WebApi | ||
{ | ||
/// <summary> | ||
/// Class Routemapper. | ||
/// </summary> | ||
public class Routemapper : IServiceRouteMapper | ||
{ | ||
/// <summary> | ||
/// Registers the routes. | ||
/// </summary> | ||
/// <param name="routeManager">The route manager.</param> | ||
public void RegisterRoutes(IMapRoute routeManager) | ||
{ | ||
routeManager.MapHttpRoute("forDNN.UsersExportImport", "default", "{controller}/{action}", | ||
new[] { "forDNN.Modules.UsersExportImport.WebApi" }); | ||
} | ||
} | ||
} | ||
|
||
|