I've seen a couple different posts on handling membership properties. I need to add users to the system with several custom properties. Using the CreateUserWizard is fine, as I can add the items I need there, but what's the current advised approach for adding these properies to the user?
Many of the samples are using deprecated methods now. Can someone post a quick couple liner on how to load a user, add properties and save them to the database using 4.5.1? My intuition is to stay away from the deprecated stuff.
And there lies the question. He has stated that it should go away, the membership methodology has changed from samples from a year ago, and there are now samples on how to do it now.
I agree that the profile provider method that you have on the site is probably the best option BUT I'm just hesitant to implement it if it will soon be obsolete. I'm working on a new set of functionality under 4.5.1. With that I have read thus far, you're methods will probably work best. I would still like confirmation from the umbraco people if they are looking to keep or dump the provider and what the best methods for handling additional properties are.
Note that I have to remove the properties since IIS complains that firstName (and any other property I've defined in Umbraco) has allready been defined.
On a webpage (profile page) I'm invoking this command on page load:
[SettingsAllowAnonymous(false)] public string FirstName { get { var o = base.GetPropertyValue("firstName"); if (o == DBNull.Value) { return string.Empty; } return (string)o; } set { base.SetPropertyValue("firstName", value); } }
This will however return an empty string, even though I've set data via umbraco membership section.
I followed Aaron Powell's article but I'm not sure I'm doing it right.
If I following his code I get the exception: "This profile property has already been defined." But when I change the property name in the inherited class (from ProfileBase) I see 2 properties while debugging: the property defined in the web.config and the property in my own class.
Is this normal behavior of the UmbracoMemberProfileProvider?
Membership properties, proper way to do it?
I've seen a couple different posts on handling membership properties. I need to add users to the system with several custom properties. Using the CreateUserWizard is fine, as I can add the items I need there, but what's the current advised approach for adding these properies to the user?
Many of the samples are using deprecated methods now. Can someone post a quick couple liner on how to load a user, add properties and save them to the database using 4.5.1? My intuition is to stay away from the deprecated stuff.
I'd like to second this question.
I also prefare not to use depricated stuff, and avoid any work arounds (using depricaded stuff even).
So, where are we with the membership support?
Here is a nice article, but is it correct today?
http://www.aaron-powell.com/umbraco-members-profiles
Should we or shouldn't we be using Membership profiles?
"The profile provider is not used and should be removed" -Niels Hartvig
http://our.umbraco.org/forum/developers/extending-umbraco/2278-where-does-umbracoprofileprovider-store-data
I may be new to Umbraco, but I'm really confused...
I'm not sure why Niels said that as we've used the profile provider a few times without any major problems...
And there lies the question. He has stated that it should go away, the membership methodology has changed from samples from a year ago, and there are now samples on how to do it now.
What I've got covered in the article on my website works as far as I'm aware.
I agree that the profile provider method that you have on the site is probably the best option BUT I'm just hesitant to implement it if it will soon be obsolete. I'm working on a new set of functionality under 4.5.1. With that I have read thus far, you're methods will probably work best. I would still like confirmation from the umbraco people if they are looking to keep or dump the provider and what the best methods for handling additional properties are.
I will be fighting every step of the way if someone tries to remove it from the 4.5.x codebase ;)
Thank you Slace, now and for your previous work.
Hmm..
Now that I'm trying to implement this thing, I'm getting a strange error.. or lack there of even..
My setup: IIS 7.5 / Umb 4.5.1
My web.config:
Note that I have to remove the properties since IIS complains that firstName (and any other property I've defined in Umbraco) has allready been defined.
On a webpage (profile page) I'm invoking this command on page load:
Which in turn invokes:
This will however return an empty string, even though I've set data via umbraco membership section.
What am I missing here?
Do I need a tissue? :oP
I followed Aaron Powell's article but I'm not sure I'm doing it right.
If I following his code I get the exception: "This profile property has already been defined." But when I change the property name in the inherited class (from ProfileBase) I see 2 properties while debugging: the property defined in the web.config and the property in my own class.
Is this normal behavior of the UmbracoMemberProfileProvider?
Is it possible to create anonymous user via UmbracoMemberProfileProvider and Umbraco 4?
is working on a reply...