Commerce Server Blog

Build world class ecommerce applications using Microsoft Commerce Server
  •  
  • Home
  • Advertise
  • Copyright Policy
  • Disclaimer
  • About

Commerce Serer Profile System – Making user name as login ID instead of email Id

ravikanth | July 17, 2008

In starter site, email ID is declared as unique field. You need to customize and extend your profile system to enable such functionality (multiple profiles with same email ID).

Perform following tasks to enable this functionality.

  • In database (startersite_profile), userprofile table make sure email column doesn’t have unique key.
  • Add another column named “u_user_name” and make sure this column has unique key.
  • If there is data already exist in the table then you may get error. Make sure you don’t apply unique key during column creation. Once column is created, copy email value (or some other unique value) to this column and then apply unique constraint on this column.
  • Open commerce server manager. Navigate to Commerce server manager -> global resources -> profiles (startersite_profiles)-> data sources -> profileservice_sqlsource ->data Objects -> user object.
  • Create a data member named “user_name” and point to the column “u_user_name”.
    Open commerce server manager. Navigate to Commerce server manager -> global resources -> profiles (startersite_profiles)-> profile definitions -> user object.
  • Under general information -> add new property named “UserName” and point to data member “user_name” of data store.
  • click on general information -> email, make sure required property is set to false and keytype is set to blank.

Till now, we have done configuration changes to use user name as unique key but to make this field as login Id, we need to tell UPM provider about this change. For that, we can do configuration changes in any of the following two places.

  • web.config – By default upmprovider takes “GeneralInfo.email_address” as logon field. You need mention explicit that instead of email ID, use username.
    <membership defaultProvider=”UpmProvider”>
                <providers>
                    <add name=”UpmProvider” type=”Microsoft.CommerceServer.Runtime.Profiles.UpmMembershipProvider” logonNameProperty=”GeneralInfo.UserName”/>
                </providers>
            </membership>
  • you can pass this information in the code as part of collections.
    UpmMembershipProvider provider = new UpmMembershipProvider();
                System.Collections.Specialized.NameValueCollection collection = new System.Collections.Specialized.NameValueCollection();
                collection.Add(“logonNameProperty”,”GeneralInfo.UserName”);
                provider.Initialize(“UpmProvider”, collection);
                bool registeredUser = provider.ValidateUser(“ravi.kanth”, “pass123″);
                Response.Write(registeredUser.ToString());
     
Categories
commerce server 2007
Tags
commerce server 2007, commerce server profile system, UPMMembership
Comments rss
Comments rss
Trackback
Trackback

« Commerce Server Road Map Commerce Server 2007 Training »

One Response to “Commerce Serer Profile System – Making user name as login ID instead of email Id”

  1. yekline says:
    August 4, 2008 at 1:49 pm

    microsoft server is hapfull for future.
    thanks.

    Reply

Leave a Reply

Click here to cancel reply.

Sign up for Newsletter


Categories

Quiz

  • Catalog Quiz for Beginners
  • Profile Quiz for Beginners
  • Quiz 1 for Advance Users
  • Quiz for Beginners

Recent Posts

  • Staging Deployment – Security Considerations
  • Pipeline Editor displays registered custom pipeline components as unknown in 64 Bit version.
  • How commerce server staging works
  • Steps to extend payments in Commerce Server 2009
  • Introduction to Commerce Server Staging
  • Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information
  • Commerce server staging throws Remote authorization failed to server. Ensure the service has access to this server.
  • Updated Commerce Server 2009 template pack for SharePoint 2007 released
  • RCXml2Resx.exe tool stops working
  • Commerce Server Profile Importer Tool

Archives

  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008

Tags

add discounts add images to profile Advantages of commerce server approve discounts authentication auto login process automatic user creation basket Brand Management business tools campaign management Catalog catalog import Category commerce server commerce server 2007 commerce server manager Commerce Server SP2 commerce server staging discounts ecommerce Estimation Installation inventory Kanth Koppala marketing system migration error Mojave operation components operation sequence Order subsystem Product profile profile subsystem property metadata purchase order quick checkout Ravi Ravi Kanth site cache refresh starter site tools transactions error Variant
(c) 2009 Commerce Server Blog. All rights Reserved. Articles cannot be reproduced without permission from the author.Write to me at kanth@ravikanth.net if you have any comments, questions, suggestions about this site or would like to send us a tip
About Us | Terms of Use | Disclaimer | Advertise .