Make UserEntryObject.SetPassword(...) virtual.

Aug 13, 2013 at 5:04 PM
I have a situation where I need to do a special action when SetPassword is called. It would be extremely useful if SetPassword was virtual as I could do something along the lines of
public override bool SetPassword(string password)
{
    var result = base.SetPassword(password);
    if (result)
        RemoteService.UpdateUserPassword(this.UserName, password);
    return result;
}
Right now I do
public bool SetPasswordAndUpdateRemote(string password)
{
    var result = SetPassword(password);
    if (result)
        RemoteService.UpdateUserPassword(this.UserName, password);
    return result;
}
but having SetPassword and SetPasswordAndUpdateRemote is a bad design choice for me.
Coordinator
Aug 13, 2013 at 5:19 PM
Hi @leftler,

First of all, thanks for using the framework. I agree the option to override SetPassword should be available. It'll be in the next release and I'll commit the change to source control if you needed it sooner.

Thanks,
Stephen Baker
Aug 13, 2013 at 6:23 PM
Edited Aug 13, 2013 at 6:24 PM
No need to rush it in. My work around is fine for now.
Coordinator
Aug 15, 2013 at 9:48 PM
Ok, the change has been committed to source control. It'll be in the next release v2.0 which is currently in Beta and should have a Beta.2 coming in the next few weeks.

Thanks,
Stephen Baker
Marked as answer by sbaker on 10/7/2013 at 9:41 AM