Skip to content

Instantly share code, notes, and snippets.

@PetersonDave
Last active December 24, 2015 13:29
Show Gist options
  • Save PetersonDave/6805061 to your computer and use it in GitHub Desktop.
Save PetersonDave/6805061 to your computer and use it in GitHub Desktop.
Check User Password complex validation
namespace Sitecore.Form.Submit
{
public class CheckUserPassword : CheckUserAction
{
...
public override void Execute(ID formid, IEnumerable<ControlResult> fields)
{
string empty;
string failedMessage = base.FailedMessage;
string str = failedMessage;
if (failedMessage == null)
{
str = ResourceManager.GetString("USER_NAME_OR_PASSWORD_IS_INCORRECT");
}
string str1 = str;
ControlResult controlResult = fields.FirstOrDefault<ControlResult>((ControlResult f) => f.FieldID == base.UserNameField);
ControlResult controlResult1 = fields.FirstOrDefault<ControlResult>((ControlResult f) => f.FieldID == this.PasswordField);
if (controlResult != null)
{
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment