This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SetPasswordSaveAction : UserBaseAction | |
{ | |
private ID _formId; | |
public override void Execute(ID formId, AdaptedResultList adaptedFields, ActionCallContext actionCallContext = null, | |
params object[] data) | |
{ | |
_formId = formId; | |
var password = adaptedFields.GetEntry(PasswordField, "Password")?.Value ?? string.Empty; | |
var userName = Tracker.Current?.Session.Contact.Identifiers.Identifier; | |
var user = Membership.GetUser(userName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IsInEngagementStateCondition<T> : WhenCondition<T> where T : RuleContext | |
{ | |
public ID StateId { get; set; } | |
protected override bool Execute(T ruleContext) | |
{ | |
var automationStateManager = Tracker.Current.Session.CreateAutomationStateManager(); | |
return automationStateManager.IsInEngagementState(StateId); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RegisterGoalAction<T> : RuleAction<T> where T : RuleContext | |
{ | |
public ID GoalId { get; set; } | |
public override void Apply(T ruleContext) | |
{ | |
if (!Tracker.IsActive || Tracker.Current.CurrentPage == null) return; | |
var goal = (PageEventItem)Context.Database.GetItem(GoalId); | |
if (goal != null) | |
{ |
NewerOlder