Is it possible to somehow check if Member.AfterSave and Member.BeforeSave is triggered from back office?
Hi All
I am trying to send an email to a member if a true/false property is checked and saved. But the Member.AfterSave and Member.BeforeSave events is also triggered on the frontend of the site, when a member is registered.
My question is, can i somehow do a check in the event, to se if the event is called in the back office or not? Or is there anotther way to only bind som code to the save member event in the back office.
Hope you guys can help me with this, before i go totally crazy :)
Best regards Kasper
Code
using System; using System.Collections.Generic; using System.Linq; using System.Web;
using umbraco.BusinessLogic; using umbraco.cms.businesslogic; using umbraco.cms.businesslogic.web; using umbraco.cms.businesslogic.property; using umbraco.cms.businesslogic.member;
namespace umbracoExtensions.classes { public class AppBase : umbraco.BusinessLogic.ApplicationBase { public bool member_isApprovedBeforeValue = false; public AppBase() { Member.AfterSave += new Member.SaveEventHandler(Member_AfterSave); Member.BeforeSave += new Member.SaveEventHandler(Member_BeforeSave); }
Made a work around, not pretty but i works for me.. Anyone ho has a better solution is very welcome to post it :)
using System; using System.Collections.Generic; using System.Linq; using System.Web;
using umbraco.BusinessLogic; using umbraco.cms.businesslogic; using umbraco.cms.businesslogic.web; using umbraco.cms.businesslogic.property; using umbraco.cms.businesslogic.member; using umbraco.NodeFactory;
namespace Janoos_umbracoExtensions.classes { public class AppBase : umbraco.BusinessLogic.ApplicationBase { public static bool member_isApprovedBeforeValue = false; public AppBase() { Member.AfterSave += new Member.SaveEventHandler(Member_AfterSave); }
Is it possible to somehow check if Member.AfterSave and Member.BeforeSave is triggered from back office?
Hi All
I am trying to send an email to a member if a true/false property is checked and saved.
But the Member.AfterSave and Member.BeforeSave events is also triggered on the frontend of the site, when a member is registered.
My question is, can i somehow do a check in the event, to se if the event is called in the back office or not?
Or is there anotther way to only bind som code to the save member event in the back office.
Hope you guys can help me with this, before i go totally crazy :)
Best regards
Kasper
Code
Made a work around, not pretty but i works for me.. Anyone ho has a better solution is very welcome to post it :)
I know this is dated but curious what did you end up using with the AfterSave event handler to send member confirm. email?
is working on a reply...