The profile work good, If I add some data directly in the Umbraco BackEnd, I can use it in my user control. But If I create a new user and then try to update profile information, I got no error but the backend members property still empty.
do we have some work around for this? Can we use the new Services.ContentService; ? I try to get an member with: IContent NodeMembre = contentService.GetById(Convert.ToInt32(user.ProviderUserKey));
again, no sucess...
I am runing out of idea. I don't understand why I can read the profile custom properties but I can't write! Like if the profile was readonly!
According to Sebastiann Janssen reply in the issues umbraco page: http://issues.umbraco.org/issue/U4-1561 the problem is a kown one. Sebastiann suggest to fall back with the deprecated member object. So I do that:
Member Mem;
Mem = Member.GetMemberFromLoginName(user.UserName);
Membre profile work but not SAVED
Hi expert!
I try to make my custom profile working. I follow the http://www.aaron-powell.com/umbraco-members-profiles ;
The profile work good, If I add some data directly in the Umbraco BackEnd, I can use it in my user control. But If I create a new user and then try to update profile information, I got no error but the backend members property still empty.
I save like this:
MemberProfile p = MemberProfile.GetUserProfile(user.UserName);
p.Prenom = txtPrenom.Text;
p.Nom = txtNom.Text;
p.Adresse = txtAdresse.Text;
p.Tel = txtTel1.Text;
p.Via = Convert.ToInt32(cboAch.SelectedValue);
p.Save();
I am user Umbraco 6.0.0 RC.
Nobody have a suggestion?
All profile process work like expected, I can read, use and display data from MemberProfile.GetUserProfile(user.UserName);
But I can't save anything if I do not pass in the umbraco Member section and add the info manually.
I try to add:
applicationName="/" in each profile, role or membership provider.
And i use p.SetPropertyValue("firstname",txtfirstName.Text); instead of profile.FirstName
Nothing saved... It is possible to debug inside the umbraco.providers.members.UmbracoProfileProvider ?
Hej Pierre,
If you are using MembershipUser class, maybe you want to take a look here.
http://msdn.microsoft.com/en-us/library/system.web.security.membershipuser.aspx
In one of the lines it says:
"A MembershipUser object is required by the UpdateUser method when you want to update the information for an existing membership user."
Not sure if that will help, but atleast I try :-)
//Dmitrij
Thanks for reply.
I test that with this code:
MembershipUser user = Membership.GetUser();
MemberProfile p = MemberProfile.GetUserProfile(user.UserName);
p.MyTest = "Something";
p.save();
Membership.UpdateUser(user);
same result. No error, no update.
Hmm... well maybe this can help somehow?
http://forums.asp.net/t/1816853.aspx/1
do we have some work around for this? Can we use the new Services.ContentService; ? I try to get an member with: IContent NodeMembre = contentService.GetById(Convert.ToInt32(user.ProviderUserKey));
again, no sucess...
I am runing out of idea. I don't understand why I can read the profile custom properties but I can't write! Like if the profile was readonly!
I found the problem and share for the community.
According to Sebastiann Janssen reply in the issues umbraco page: http://issues.umbraco.org/issue/U4-1561 the problem is a kown one. Sebastiann suggest to fall back with the deprecated member object. So I do that:
Member Mem;
Mem = Member.GetMemberFromLoginName(user.UserName);
Mem.getProperty("prenom_client").Value = txtPrenom.Text;
Mem.getProperty("nom_client").Value = txtNom.Text;
Mem.getProperty("adresse_client").Value = txtAdresse.Text;
Mem.getProperty("tel_client").Value = txtTel1.Text;
Mem.getProperty("acheminer_via").Value = Convert.ToInt32(cboAch.SelectedValue);
//Generate member Xml Cache
Mem.XmlGenerate(new System.Xml.XmlDocument());
//Save member
Mem.Save();
and it work!
I hope Umbraco will post an update on this!
Thanks for your help.
is working on a reply...