Create peer profiles in Sitecore for every
Sitecore Commerce 7.5, powered by Commerce Server and Commerce Server
11.1 profile
and link them, allowing you to use Sitecore Commerce 7.5, powered by Commerce Server and Commerce Server
11.1 to manage
profiles and control the password being set for that user in Sitecore.
Complete the following prerequisites:
Complete this task from either a command line utility, or from Sitecore User
Manager
Note: Importing a large profile set (millions of profiles) can take days, due
to the loads placed on the SQL server. Carefully make the following configuration
changes to the system before importing profiles to improve system
performance.
.
-
Drop the IX_UserObject_ExternalId index : Allows External
Ids with no values (Which will be filled in by Sitecore).
Use the following SQL script to drop the
Index:
IF EXISTS (SELECT name FROM sysindexes WHERE name = 'IX_UserObject_ExternalId')
DROP INDEX [IX_UserObject_ExternalId] ON [dbo].[UserObject]
GO
-
Comment out the user:updated event section <sitecore web root>\
App_Config\Include\ CommerceServer -
\configuration\events\event[@name="user:update"] )
<event name="user:updated">
<handler type="Sitecore.Commerce.CommerceUserEventHandler, Sitecore.Commerce" method="OnUserUpdated" />
</event>
-
Update BulkImport.sql so that the path to the insert files is correct.
-
Execute BulkImport.sql. This will delete existing profiles.
-
If required configure a IProfileImportPasswordGenerationConfiguration File:
Sitecore Website\App_Config\Include\CommerceServer.
Default
Configuration
<type name="IProfileImportPasswordGeneration" type="Sitecore.Commerce.Utilities.ProfileImportPasswordGeneration, Sitecore.Commerce" lifetime="Singleton" />
Performance
Password Generator
Configuration:
<type name="IProfileImportPasswordGeneration" type="Performance.ProfileImport.Password.PasswordGenerator, Performance.ProfileImport.Password" lifetime="Singleton" />
-
Disable the switching profile provider by enabling Sitecore's default
provider
Modify the web.config at the following location:
/configuration/system.web/profile. Change
<profile
defaultProvider="switcher" enabled="true"
inherits="Sitecore.Security.UserProfile, Sitecore.Kernel"> to:
<profile defaultProvider="sql" enabled="true" inherits="Sitecore.Security.UserProfile, Sitecore.Kernel">
-
Import Profiles by using the Sitecore User Manager.
-
Create IX_UserObject_ExternalId index.
CREATE UNIQUE NONCLUSTERED INDEX [IX_UserObject_ExternalId] ON [dbo].[UserObject]
(
[u_external_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
-
Un-Comment out the user:updated event section.
-
Enable the switching provider.
Change
<profile defaultProvider="switcher" enabled="true" inherits="Sitecore.Security.UserProfile, Sitecore.Kernel">
to
<profile defaultProvider = " sql " enabled = " true " inherits = " Sitecore.Security.UserProfile, Sitecore.Kernel
All the users that you had in the Sitecore Commerce 7.5, powered by Commerce Server and Commerce Server
11.1 profile
system are registered in the same membership provider as Sitecore, and
users will now be able to log in using that provider.