Im hoping someone in here will be able to offer some suggestions with a problem Im working on. I would like to store some user profile fields in the member table of the Umbraco database. I would like to have these fields filled by a user on a sign up page. It seems that the standard way of adding additional member fields in Umbraco is through using properties but this is not what I want for my application
Does anyone have any suggestions on how to go about implementing this?
It does sound valid to store user profile fields in the umbraco member table but that would require a db schema change, right? It can be done, but that would create a hassle when doing upgrades as you'll have to take care of db schema updates yourself? Also, you wouldn't be able to admin members from the admin section unless you write your own admin page for members (requiring to change the member tree or changing the behaviour of the member adminstration page).
I don't say it can't be done, I just currently can't see any advantage in doing so unless for less database calls when getting the profile info for a specific member in the frontend (ok, that would make a difference, but unless your profile fields don't change too much, you could write a - complex - sql statement to get all member info in a single db call).
Your response is much appreciated. Perhaps if I tell you what we are trying to achieve you might be able to give me your thoughts on how you might implement a solution.
We are building a prototype site to model an idea we have for a project. Basically I need a field for each user that keeps track of an "account balance". For arguments sake lets just say each user has money stored and their account can be credited of debited. Now this field is changed by a REST webservice that we have written external to Umbraco. I would like to use .net/Umbraco's membership package to implement this and it seems to me that the easiest way to do this is by adding an "Account Balance" field in the members table of the umbraco DB.
Now, we could use a property field which would be great as Umbraco as it would be easy to display account balances. Im thinking that getting our service to update the field this way could be a little tricky.
Standard Membership profiles enables you to add custom columns / values. Though if you want it to show up in Umbraco admin im sofar not checked out how to accomplish that. If you dont specify an external table / db for the profile, but using builtin profile storage(one large serialized container for all values yu specify / user) you dont need to modify any db tables at all. If i understand you correctly this is enough? This would enable you to show values with your custom controls to each user. Though if you use web application project to build these controls you will prbably have to create your own custom profile helper since the profilecommon is only autogenerated in web site projects in VS.
Ok erik I think you have convince me :-). Im going to play around with our service and see if I can get it to update the property field. When i think about it, it should not be difficult to access. Thanks for setting me straight!
Storing member fields in the umbraco database
Hi all,
Im hoping someone in here will be able to offer some suggestions with a problem Im working on. I would like to store some user profile fields in the member table of the Umbraco database. I would like to have these fields filled by a user on a sign up page. It seems that the standard way of adding additional member fields in Umbraco is through using properties but this is not what I want for my application
Does anyone have any suggestions on how to go about implementing this?
Thanks in advance for any suggestions,
Mick
Hi Mick,
It does sound valid to store user profile fields in the umbraco member table but that would require a db schema change, right? It can be done, but that would create a hassle when doing upgrades as you'll have to take care of db schema updates yourself? Also, you wouldn't be able to admin members from the admin section unless you write your own admin page for members (requiring to change the member tree or changing the behaviour of the member adminstration page).
I don't say it can't be done, I just currently can't see any advantage in doing so unless for less database calls when getting the profile info for a specific member in the frontend (ok, that would make a difference, but unless your profile fields don't change too much, you could write a - complex - sql statement to get all member info in a single db call).
Just my 2 cents.
Cheers,
/Dirk
Dirk,
Your response is much appreciated. Perhaps if I tell you what we are trying to achieve you might be able to give me your thoughts on how you might implement a solution.
We are building a prototype site to model an idea we have for a project. Basically I need a field for each user that keeps track of an "account balance". For arguments sake lets just say each user has money stored and their account can be credited of debited. Now this field is changed by a REST webservice that we have written external to Umbraco. I would like to use .net/Umbraco's membership package to implement this and it seems to me that the easiest way to do this is by adding an "Account Balance" field in the members table of the umbraco DB.
Now, we could use a property field which would be great as Umbraco as it would be easy to display account balances. Im thinking that getting our service to update the field this way could be a little tricky.
Any ideas on this?
Thanks again,
Mick
Standard Membership profiles enables you to add custom columns / values. Though if you want it to show up in Umbraco admin im sofar not checked out how to accomplish that. If you dont specify an external table / db for the profile, but using builtin profile storage(one large serialized container for all values yu specify / user) you dont need to modify any db tables at all. If i understand you correctly this is enough? This would enable you to show values with your custom controls to each user.
Though if you use web application project to build these controls you will prbably have to create your own custom profile helper since the profilecommon is only autogenerated in web site projects in VS.
Hi Mick,
I don't really understand why then you are not just using the standard property data?
If you know the field node id and the member node id then it's not a problem to both read and update the property data.
Ok erik I think you have convince me :-). Im going to play around with our service and see if I can get it to update the property field. When i think about it, it should not be difficult to access. Thanks for setting me straight!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.