Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Nov 11, 2010 @ 10:27
    Ismail Mayat
    1

    Member save Examine indexer issue

    Having a weird problem with members and examine.  I have contour form that upon submit has custom workflow that creates a member. The member creation code looks like

    MemberType memberType = new MemberType(memberTypeId);
                    member = Member.MakeNew(name, memberType, author);
                    member.LoginName = email;
                    member.Email = email;
                    member.Password = password;
                    if (member.getProperty("exported") != null)
                    {
                        member.getProperty("exported").Value = 0.ToString();
                    }
                    if (member.getProperty("activated") != null)
                    {
                        member.getProperty("activated").Value = 1.ToString();
                    }
                    if (!member.Groups.ContainsKey(memberGroup))
                    {
                        member.AddGroup(memberGroup);   
                    }
                    member.Save();

    the member ends up in the member examine index.  The issue is that for exported property the value is always nothing it should be 0, the activated property works fine and is set to 1.  If I open the newly saved member then set the exported property to true (property is true/false) then save.  Then uncheck the exported value then save it then sets the property to 0.

     It seems as though on the initial member creation the exported property although being set is not being picked up. Is my save method incorrect do i before the save need to add member to cache?  I am using umbraco 452 

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Nov 11, 2010 @ 10:56
    Ismail Mayat
    1

    Update on this, I just completed another entry with values 

    email:[email protected]

    First name: Export 9

    Last name:Export 9

    In the index I should have email and loginname set to [email protected] instead I have email field blank, loginName set to Export 9 Export 9.  Here is the weird thing if i save the member through the editor so another call is made to index the member the values are then correct, its seems as though at the point in workflow when member save is called the xml stub generated in index queue directory is not correct or when the data is retrieved for indexing then at that point its not correct, however calling the save through the editor generates a correct member.  The member itself is saved correctly in the members section.

    Regards

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft