Member.New event password prop is empty (Umbraco 4)
Hi,
I am using
the Member.New event to send of an email to new members containing their credentials
etc.
But the
Member object that is parsed to the Event dos not have any information in the
Member.Password property, it’s a blank string. I have used the same solution in
other places (getting the password from the member property) and it works fine.
it's empty as it's not set at the time the member gets created in code using Member.MakeNew() (well, it's set to empty string, even tho you may have entered an initial password), so there's no way to get the password on the new event. I'd try using the Member.Save() event to get the password.
Good pointer,
but the Save event is triggered every time the member is updated. I guess I
could always add a flag to the member profile, but it seems like a weak
solution.
If you are using the ui to create the member use the memberTasks.NewMember event. This fires after the loginname and password are set. the unencrypted password is a property you can access in this event along with the entire member object.
Member.New event password prop is empty (Umbraco 4)
Hi,
I am using the Member.New event to send of an email to new members containing their credentials etc.
But the Member object that is parsed to the Event dos not have any information in the Member.Password property, it’s a blank string. I have used the same solution in other places (getting the password from the member property) and it works fine.
Anyone know why it’s empty at the time of the New event?
Is there any way I could get the password at the time of the event?
Cheers
it's empty as it's not set at the time the member gets created in code using Member.MakeNew() (well, it's set to empty string, even tho you may have entered an initial password), so there's no way to get the password on the new event. I'd try using the Member.Save() event to get the password.
Cheers,
/Dirk
Good pointer, but the Save event is triggered every time the member is updated. I guess I could always add a flag to the member profile, but it seems like a weak solution.
How are you creating the member, why can't you have code run after that point?
I have embeded a CreateUserWizard into a template.
If you are using the ui to create the member use the memberTasks.NewMember event. This fires after the loginname and password are set. the unencrypted password is a property you can access in this event along with the entire member object.
is working on a reply...