Skip to content

Commit

Permalink
Version 1.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Feb 7, 2024
1 parent 8416d89 commit 6eb0cf0
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 16 deletions.
11 changes: 8 additions & 3 deletions Components/CommonController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,11 @@ public static string DoImport(PortalSettings objPortalSettings, string LocalReso
objPPD.PropertyCategory = "Imported";
objPPD.DataType = 349;
DotNetNuke.Entities.Profile.ProfileController.AddPropertyDefinition(objPPD);
objUser.Profile.SetProfileProperty(dc.ColumnName, string.Format("{0}", dr[dc.ColumnName]));
objUser.Profile.SetProfileProperty(dc.ColumnName, RemoveNewLine(string.Format("{0}", dr[dc.ColumnName])));
}
else
{
objUser.Profile.SetProfileProperty(dc.ColumnName, string.Format("{0}", dr[dc.ColumnName]));
objUser.Profile.SetProfileProperty(dc.ColumnName, RemoveNewLine(string.Format("{0}", dr[dc.ColumnName])));
}
}
}
Expand Down Expand Up @@ -473,7 +473,12 @@ public static string DoImport(PortalSettings objPortalSettings, string LocalReso
FailedUsers.ToString());
}

private static string UpdateRoles(UserInfo objCurrentUser,
private static string RemoveNewLine(string Source)
{
return Source.Replace("\r", "").Replace("\n", "");
}

private static string UpdateRoles(UserInfo objCurrentUser,
PortalSettings objPortalSettings,
UserInfo objUser,
DataRow dr,
Expand Down
1 change: 1 addition & 0 deletions Components/ExportController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ SELECT DISTINCT CAST(l.EntryID AS int) EntryID, [Value]
FROM {databaseOwner}{objectQualifier}ProfilePropertyDefinition ppd
LEFT JOIN {databaseOwner}{objectQualifier}Lists l ON (ppd.DataType=l.EntryID) AND (l.ListName='DataType')
WHERE ppd.PortalID=0
AND ppd.Deleted=0
AND (l.Value in (SELECT DISTINCT ListName FROM {databaseOwner}{objectQualifier}Lists WHERE (ListName<>'DataType')))
";
idr = DotNetNuke.Data.DataProvider.Instance().ExecuteSQL(sqlProfilePropertiesList);
Expand Down
9 changes: 7 additions & 2 deletions Install/_UsersExportImport.dnn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="forDNN.UsersExportImport" type="Module" version="1.2.8">
<package name="forDNN.UsersExportImport" type="Module" version="1.2.9">
<friendlyName>forDNN.UsersExportImport</friendlyName>
<description>This module allows to export/import users, user profiles properties and roles to DNN (former DotNetNuke) from CSV/XML files. This is simple and fast way to create your users accounts in one click.</description>
<owner>
Expand All @@ -10,7 +10,7 @@
<email>[email protected]</email>
</owner>
<license>
Copyright (c) 2020, forDNN Team&lt;br/&gt;
Copyright (c) 2024, forDNN Team&lt;br/&gt;
All rights reserved.&lt;br/&gt;
&lt;br/&gt;
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:&lt;br/&gt;
Expand All @@ -25,6 +25,11 @@
</license>
<releaseNotes>
<![CDATA[
<b>Version 1.2.9:</b><br />
Fixed an issue with exporting deleted User Profile Properties (https://github.com/fordnn/usersexportimport/issues/18)<br />
Fixed an issue with importing "PreferredLocale" from CSV file (https://github.com/fordnn/usersexportimport/issues/17)<br />
Tested with DotNetNuke version 9.13.2<br />

<b>Version 1.2.8:</b><br />
Fixed an issue with multiple fields with the same types "List" instead of numeric values (for example "Country", "Country2", "Region")<br />

Expand Down
27 changes: 18 additions & 9 deletions MainControl.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,26 @@ namespace forDNN.Modules.UsersExportImport
partial class MainControl : PortalModuleBase, IActionable
{

#region "Event Handlers"
#region "Event Handlers"

private void FillProperties()
{
ProfilePropertyDefinitionCollection lst = new ProfilePropertyDefinitionCollection();
foreach (ProfilePropertyDefinition ppd in ProfileController.GetPropertyDefinitionsByPortal(this.PortalId))
{
if (ppd.Deleted) continue;
lst.Add(ppd);
}

cblPropertiesToExport.DataSource = lst;
cblPropertiesToExport.DataTextField = "PropertyName";
cblPropertiesToExport.DataValueField = "PropertyDefinitionId";
cblPropertiesToExport.DataBind();
}


private void FillProperties()
{
cblPropertiesToExport.DataSource = ProfileController.GetPropertyDefinitionsByPortal(this.PortalId);
cblPropertiesToExport.DataTextField = "PropertyName";
cblPropertiesToExport.DataValueField = "PropertyDefinitionId";
cblPropertiesToExport.DataBind();
}

private void ExtraPageLoad()
private void ExtraPageLoad()
{
lblIcon.Visible = true;
lblIcon.Style["display"] = "block";
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("forDNN")]
[assembly: AssemblyProduct("Users Export/Import for DNN (former DotNetNuke)")]
[assembly: AssemblyCopyright("(c) forDNN 2003-2020")]
[assembly: AssemblyCopyright("(c) forDNN 2003-2024")]
[assembly: AssemblyTrademark("")]
[assembly: GuidAttribute("a9a2f906-2bbe-44fa-9c6d-4c3137d872a8")]

Expand All @@ -29,4 +29,4 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.2.8.*")]
[assembly: AssemblyVersion("1.2.9.*")]

0 comments on commit 6eb0cf0

Please sign in to comment.