Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Pinal Bhatt 298 posts 390 karma points
    Nov 19, 2010 @ 16:04
    Pinal Bhatt
    0

    Umbraco Profile Provider not working.

    Out of box - Umbraco Profile Provider not working. Friends, any clues or pointers on this.

    Thanks in advance.

    - Pinal Bhatt

  • Eduardo 106 posts 130 karma points
    Nov 19, 2010 @ 16:11
    Eduardo
    0

    Hi Pinal,

    Take a look at this web.Config:

     <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
          <providers>
            <clear />
              <add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Another Type" passwordFormat="Hashed" />
              <add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />
            </providers>
           </membership>
           <profile defaultProvider="UmbracoMemberProfileProvider" enabled="true" >
               <!--inherits="BeComputed.MemberProfile"-->
              <providers>
                  <clear />
                  <add name="UmbracoMemberProfileProvider" type="umbraco.providers.members.UmbracoProfileProvider, umbraco.providers" />
              </providers>
              <properties>
                  <clear />
                  <add name="nombre" allowAnonymous="false"  provider="UmbracoMemberProfileProvider" type="System.String" />
                  <add name="apellidos" allowAnonymous="false"  provider="UmbracoMemberProfileProvider" type="System.String" />
                  <add name="fechaexpiracion" allowAnonymous="false"  provider="UmbracoMemberProfileProvider" type="System.DateTime" />
              </properties>
          </profile>
          <!-- added by NH to support membership providers in access layer -->
        <roleManager enabled="true" defaultProvider="UmbracoRoleProvider">
            <!--AspNetSqlRoleProvider-->
          <providers>
            <clear />
            <add name="UmbracoRoleProvider" type="umbraco.providers.members.UmbracoRoleProvider" />
            <!--<add connectionStringName="LocalSqlServer" applicationName="UMBRACO" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
            <add applicationName="UMBRACO" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />-->
          </providers>
        </roleManager>
        <!-- Sitemap provider-->
        <siteMap defaultProvider="UmbracoSiteMapProvider" enabled="true">
          <providers>
            <clear />
            <add name="UmbracoSiteMapProvider" type="umbraco.presentation.nodeFactory.UmbracoSiteMapProvider" defaultDescriptionAlias="description" securityTrimmingEnabled="true" />
          </providers>
        </siteMap>

    Ensure that the defaultProvider is UmbracoMemberProfileProvider and that is set to true:

    <profile defaultProvider="UmbracoMemberProfileProvider" enabled="true" >

    HTH.

    Sincere regards,
    Eduardo

  • Pinal Bhatt 298 posts 390 karma points
    Nov 19, 2010 @ 16:16
    Pinal Bhatt
    0

    Eduardo, Thanks a lot for prompt response. 

    This is fine in my case. Below is the exact entry i have in my web.config:

     <profile defaultProvider="UmbracoMemberProfileProvider" enabled="true">
        <providers>
            <clear />
             <add name="UmbracoMemberProfileProvider" type="umbraco.providers.members.UmbracoProfileProvider, umbraco.providers" />
        </providers>
        <properties>
             <clear />
             <add name="FirstName" allowAnonymous ="false" provider="UmbracoMemberProfileProvider" type="System.String" />
             <add name="LastName" allowAnonymous ="false" provider="UmbracoMemberProfileProvider" type="System.String" />
             <add name="DisplayName" allowAnonymous ="false" provider="UmbracoMemberProfileProvider" type="System.String" />
             <add name="LoginProvider" allowAnonymous ="false" provider="UmbracoMemberProfileProvider" type="System.String" />
             <add name="LoginProviderUID" allowAnonymous ="false" provider="UmbracoMemberProfileProvider" type="System.String" />
             <add name="AuthProvider" allowAnonymous ="false" provider="UmbracoMemberProfileProvider" type="System.String" />
             <add name="ThumbnailUrl" allowAnonymous ="false" provider="UmbracoMemberProfileProvider" type="System.String" />
        </properties>
    </profile>

  • Pinal Bhatt 298 posts 390 karma points
    Nov 19, 2010 @ 16:19
    Pinal Bhatt
    0

    And here is the code snippet i used to access profile which is not working:

     

    var profile = ProfileBase.Create(userName, true); 

      profile["FirstName"] = fName;

                    profile["LastName"] =lName;

                    profile["DisplayName"] = displayName;

                    profile["LoginProvider"] = CookieManager.GetCookieValue(CookieHelper.COOKIE_GIGYA_INFO, "loginProvider") ?? string.Empty; ;

                    profile["LoginProviderUID"] = CookieManager.GetCookieValue(CookieHelper.COOKIE_GIGYA_INFO, "loginProviderUID") ?? string.Empty; ;

                    profile["AuthProvider"] = "gigya";

                     profile["ThumbnailUrl"] = thumbnailURL;

    profile.Save();

  • Eduardo 106 posts 130 karma points
    Nov 19, 2010 @ 16:28
    Eduardo
    0

    Hi Pinal,

    If what you want is to add properties to your members, first you have to add those properties in Members section->memberTypes folder->[memberType]

    http://es.tinypic.com/r/29dbmm9/7

    Then you should fgetthis properties with the getProperty method:

    var member = Member.GetMemberByName("xxx");

    var name = member.getProperty("realname").Value;

    HTH.

    Sincere regards,
    Eduardo Macho

  • Pinal Bhatt 298 posts 390 karma points
    Nov 19, 2010 @ 16:34
    Pinal Bhatt
    0

    i c.... thanks for the update. I need to look into this. I could not find any good link for basic information on using Membership/Role/Profile providers for Umbraco. Can you suggest any? it would of gr8 help.

  • Eduardo 106 posts 130 karma points
    Nov 19, 2010 @ 16:38
    Eduardo
    0

    Hi Pinal,

    I don't know any site to look for this information.

    Otherwise if you want to create a typed profile I can help you but, as I said before, I highly recommend you to create profiles from Umbraco's backend.

    Sincere regards,
    Eduardo

  • Pinal Bhatt 298 posts 390 karma points
    Nov 19, 2010 @ 16:41
    Pinal Bhatt
    0

    Thanks Eduardo. I love this community. Though Umbraco is very worst in terms of documentation... this community is great.

    I will try to implement  Profiles in Umbraco way and let u know.

    Once again thanks a lot.

    Regards,

    Pinal Bhatt

  • Eduardo 106 posts 130 karma points
    Nov 19, 2010 @ 16:45
    Eduardo
    0

    Hi Pinal,

    You are welcome, if you have any doubt, please ask.

    Sincere regards,
    Eduardo

  • Eduardo 106 posts 130 karma points
    Nov 21, 2010 @ 14:15
    Eduardo
    0

    Pinal,

    Is everything ok?

    If your problem is solved, plase mark the answer.

    Sincere regards,
    Eduardo

  • ashwini 43 posts 63 karma points
    May 23, 2012 @ 19:44
    ashwini
    0

    hi Pinal,

    How did you go about in displaying the member profiles ? I am looking for something like for the site i am working on, i used CMS export to export the data from excel into members but i am not sure as how to diplay them....any help would greatly be appreciated !

    ashwini kamath.

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies