Does anyone have a simple, easy to follow method for creating a Change Password page and a Forgotten Password (i.e. reset password and email it) page for MEMBERS in Umbraco 7.2.5?
I am using the built-in functionality for login and login status, and am looking for something simple to enable the change / forgotten password pages.
I don't need password retrieval right now, though I imagine that might be helpful to others.
Hi Allan,
You probably want to create a SurfaceController (or APIController) and implement the ChangePassword and ResetPassword functionality in your own views - the Controller would just use the MembershipHelper which has methods like ChangePassword.
It's always a good idea to take a look at how the core does it; do a search for ChangePassword, for example, and also search for MembershipHelper.
Also, check out this documentation on MembershipHelper:
Thanks Robert - though not being familiar with SurfaceControllers, I still have little idea where to start with this. Do you have some sample code by any chance, and details of what files I'd need to add where in the umbraco file structure? I doubt I'm the first, and won't be the last, to need a simple way of enabling members to change their passwords!
I'm trying to create members from a list from a text file, but they all get created without passwords, so I have to edit all of them in backoffice afterwards, which makes the whole process of creating them like this kinda pointless.
// Reading all lines from the file.
string[] lines = System.IO.File.ReadAllLines(filePath, Encoding.UTF8);
// Every line is a member.
foreach (string line in lines)
{
// Splitting the line.
// 0 name
// 1 email
// 2 club
// 3 phone
// 4 address
// 5 zip
string[] values = line.Split(',');
var newMember = ApplicationContext.Current.Services.MemberService.CreateMemberWithIdentity(values[1], values[1], values[0], "RegularMember");
ApplicationContext.Current.Services.MemberService.Save(newMember);
newMember.SetValue("club", values[2]);
newMember.SetValue("phone", values[3]);
newMember.SetValue("address", values[4]);
newMember.SetValue("zip", values[5]);
ApplicationContext.Current.Services.MemberService.Save(newMember);
ApplicationContext.Current.Services.MemberService.SavePassword(newMember,"123456");
}
The members are created, all member properties are set, but they can't log in with the given password...
Change Password and Forgotten Password
Does anyone have a simple, easy to follow method for creating a Change Password page and a Forgotten Password (i.e. reset password and email it) page for MEMBERS in Umbraco 7.2.5?
I am using the built-in functionality for login and login status, and am looking for something simple to enable the change / forgotten password pages.
I don't need password retrieval right now, though I imagine that might be helpful to others.
Thanks
Allan
Anyone able to share any thoughts on this please??
Thanks, Allan
Hi Allan, You probably want to create a SurfaceController (or APIController) and implement the ChangePassword and ResetPassword functionality in your own views - the Controller would just use the MembershipHelper which has methods like ChangePassword.
It's always a good idea to take a look at how the core does it; do a search for ChangePassword, for example, and also search for MembershipHelper.
Also, check out this documentation on MembershipHelper:
https://our.umbraco.org/Documentation/Implementation/Query-Data/MemberShipHelper/index
Thanks Robert - though not being familiar with SurfaceControllers, I still have little idea where to start with this. Do you have some sample code by any chance, and details of what files I'd need to add where in the umbraco file structure? I doubt I'm the first, and won't be the last, to need a simple way of enabling members to change their passwords!
Thanks, Allan
Hi Allan, this should fill in the missing bits for you:
https://our.umbraco.org/documentation/Getting-Started/Code/Forms-Controllers/
I'd give you an example but its a little difficult on my phone at the moment 😊
Hiya,
Change Password:
Reset Password & Email To User:
Hope this helps, L
Allan, did you get this working?
I'm trying to create members from a list from a text file, but they all get created without passwords, so I have to edit all of them in backoffice afterwards, which makes the whole process of creating them like this kinda pointless.
The members are created, all member properties are set, but they can't log in with the given password...
Hi all,
Is there any updates/enhancements anyone can make to this page before we kickoff adding 'Forgotten password' to Members functionality.
Update: This looks interesting to my non-coder eyes. http://siempresolutions.co.uk/blog/Umbraco_Members_Part_3_A_Full_Solution
Also, I was wondering if anyone has added 2FA to this process?
Many thanks Lorraine :-)
is working on a reply...