Sitecore Transfer User Passwords

Original artikel: https://kb.sitecore.net/articles/242631

This article describes the inconveniences of password loss in Sitecore when moving users from one Sitecore instance to another and points out that it is particular inconvenient when transferring many users.

It gives you a tool for transfering passwords easily by copying the SQL value in the database field from one core database to another.

However this tool is not very user friendly when it comes to selecting the users. This must be done by selecting one user at the time and clicking ">>" to move the user to the transfer password list (you cannot select many or all in one selection). When you need to transfer passwords of your 2500+ user you just have moved by serialization, this is not a viable solution, if you wish to avoid seriously damages to your hand and fingers :)

If you need to transfer all or all but a few, the solution is simple.

Edit the aspx from the article and in the btnTransfer_Click function let it retrieve the users from your initial list. Then you can remove the few users you wish to not transfer password for to the other list, or simply transfer all of the original users passwords.

So instead of calling:

protected void btnTransfer_Click(object sender, EventArgs e)
    {
        if (lbTransferPasswords.Items != null && lbTransferPasswords.Items.Count > 0)
        {
            int count = UpdatePasswords(tbSQL2.Text, SelectPasswords(tbSQL1.Text, lbTransferPasswords.Items));
            SetErrorMessage(Color.Green, String.Format("{0} user passwords were transferred successfully!", count));
            btnRefresh_Click(sender, e);
        }
        else
        {
            SetErrorMessage(Color.Red, "The list of users whose passwords will be transferred cannot be empty!");
        }
    }

Change it to:

protected void btnTransfer_Click(object sender, EventArgs e)
    {
        if (lbUsersIntersect.Items != null && lbUsersIntersect.Items.Count > 0)
        {
            int count = UpdatePasswords(tbSQL2.Text, SelectPasswords(tbSQL1.Text, lbUsersIntersect.Items));
            SetErrorMessage(Color.Green, String.Format("{0} user passwords were transferred successfully!", count));
            btnRefresh_Click(sender, e);
        }
        else
        {
            SetErrorMessage(Color.Red, "The list of users whose passwords will be transferred cannot be empty!");
        }
    }

Sitecore WFFM not sending emails

Some weeks ago, I had an issue with the Sitecore Web Forms For Marketers (WFFM) module related to the Save Actions and sending out Email messages. All the data collection was handled in MongoDB correctly, but in some of the forms no emails was send.

When the WFFM did not send out email messages, I found the following exception message in the log file:

"Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Sitecore.Forms.Core
at Sitecore.Form.UI.Adapters.ListControlAdapter.AdaptToFriendlyListValues(FieldItem field, String value, Boolean returnTexts)
at Sitecore.Form.UI.Adapters.ListControlAdapter.AdaptToFriendlyValue(FieldItem field, String value)
at Sitecore.Form.Core.Utility.FieldReflectionUtil.GetAdaptedValue(FieldItem field, String value)
at Sitecore.Form.Core.Pipelines.ProcessMessage.ProcessMessage.ExpandTokens(ProcessMessageArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Form.Core.Submit.SubmitActionManager.ExecuteSaving(ID formID, ControlResult[] list, ActionDefinition[] actions, Boolean simpleAdapt, ID sessionID)"


Taking a look at the exception it shows some problems with the AdaptToFiendlyListValues method. So I knew it had something to do with List fields types. 

Looking at one of the WFFM List field item at a WFFM form the list data was stored in the “Localized Parameters” field. It seemed all good and fine:

  • %3cquery+t%3d%22default%22+sov%3d%22true%22%3e%3cvalue%3eyes%3c%2fvalue%3e%3c%2fquery%3e%3cquery+t%3d%22default%22+sov%3d%22true%22%3e%3cvalue%3eno%3c%2fvalue%3e%3c%2fquery%3e


Reflecting the “Sitecore.Form.UI.Adapters.ListControlAdapter.AdaptToFriendlyListValues” in Sitecore.Forms.Core.dll:




The Regex.Match in line 21 expect a decoded value – but the value stored in the “Localized Parameters” field was encoded.

Decoding and saving the value stored in the “Localized Parameters” field of the List field item, the value would be:

  • "<items><query sov="true" t="default"><value>yes</value></query><query sov="true" t="default"><value>no</value></query></items>"

The form could now send out emails regarding the field types.

I created a Sitecore Support Ticket and Sitecore responded quickly and provided me with a Support dll. 

To track the future status of this bug report go to:



Related to WFFM 8.0 rev. 151127