Hello there,
I spent some time trying to find anythig about extendig user registration, and found only the way, described by Jose Lema. The way CS extended properties work is that it does not allow running queries against tnat extended data because it's stored in kind of delimeted string.
There is also a frequent request from developers about the ability to store user data “in the clear” in the database so that the data is available for querying and use in stored procedures.
Here is and example of similar solution with TableProfielProvider http://www.asp.net/downloads/sandbox/table-profile-provider-samples/
Is there any example of storing each extended property in a separate database column in cs_Users table (or any other table) ?
Let say, I extended cs_Users table adding some new fields. The next step would be adding some controls on registration form to collect additional user info and writing a routine to store it in those new fields. How to do it using sub-forms? Example of using sub-forms here http://docs.communityserver.org/wiki/page.aspx/312/how-to-extend-user-registration-using-sub-forms/ stores all additional data as a string in one field. How to use sub-forms to store data in separate fields?
I would appreciate any head start in that direction.
Thanks
If you are only looking to query the data for reporting, then you could do something like this. But that probably isn't going to give you the performance you need.
Jeff,
Thank you for your responce. I've seen that idea before. Yes, performance would be an issue.
And the other problem is that I need to store historical data in side tables, like work history.
Any more ideas please?
Hi Klim,
I'm currently extending the CS Schema and source code to do this for my own needs. I'm keeping notes and hope to have a blog post on it soon.
Unitl then, maybe someone else can help...
Jon
Jon,
Please keep me posted. I'm doing the same thing. If you want, we could consolidate our efforts. Community asked for such a sample long time ago. I see very old posts with such a request.
Thanks,
Klim
I'm putting about an hour and a half a day on the side trying to integrate CS with an existing site.
I identified the extension points, and have just merged my site with CS. I updated the CS Schema and added an FK off of the profile to my tables.
Next, I'll update the code and see how it goes.
I'll keep you posted,
which table did you extend with the new fields? sc_UserProfile or cs_Users? I extended cs_Users.
I actually got the whole registation process updated this morning. I can register with the new attributes, and see them in the user profile page after registration. I updated the cs_UserProfile table myself. I don't think it really matters at this point as there is a view that joins the two tables to populate that user object. My values seemed more profile-like, so I added them there.
I actually got a somewhat complex registration form working this morning. I have created a new subform, but the article that I saw on doing this had code that did not work for me, as the selected value was not correct. In the article I saw, they need to move the code for getting the selected value to the DataBind area, as asp.net will have no way of setting the selected value if the dropdown list does not have items in it yet. Populating the list in the attach controls method is still ok.
I fixed the issues that I found in that articles code, and went a step further.
My subform has two dropdown lists. One dropdown is meant to filter the second dropdown, and the second dropdown actually has the value that I need to save to the profile.
I wrapped both of these in an ASP.net AJAX update panel and it is working well. I now havea cascading dropdown that selects the extended attribute for the user and saves this to a table I can query.
I'm keeping details notes and plan to write a detailed post on all the steps it took.
How is your work going?
I extended cs_User with 16 more fields, added 12 tables to the schema and created subform for additional user registration info. At this point I store test data, collected from subform, into one field as delimited string. Just exact way as from CS provided example. It's just for testing purposes. Anyway, I'm also able to see all registered data in profile. But it's no t in the way I want it to be. I'm new to CS and I'm trying to understand architecture behind, since there is no docs for this turkey. I also have several cascading DDLs and today I'm going to play with enabling AJAX form my project.
I have saved all data to new columns in the cs_UserProfile table. I have managed to aquire the information on registion and edit it in the edit profile page (I added a new tab on the edit page for the new fields). Since I have some cascading dropdowns, I ajax enabled this with the UpdatePanel.
I can also see the new user information in: user profile, flat forum view and the thread forum view.
So far so good. I think I'm pretty close to where I want to be.
BTW, the code structure is really clean. The sub form concept is really good. They should have just put a few plug-in points in the data layer and it would have been really solid.
More work on this tomorrow...
I realize you are very busy however when you have a chance could you blog a little about how this is done?
peace shakes
Carolina Pulse
Hey shakes,
I'm going to do a full write up hopefully on Saturday.
Hopefully my steps should be really easy to follow...
Cheers,
looking forward to it...that is the next big mile stone in my little project!
As promised here is my write up. I recommend downloading the pdf version that I linked in the post as I found out posting blog posts with code from MS word to Wordpress is not good. In addition, I think I need to update my site to have a fluid layout so that I can post code samples.
http://proactivelogic.com/blog/index.php/2007/11/03/extending-community-server-2007-user-profiles-and-vista-setup/
A snippet from the post:
"This post will go over my notes on how I accomplished extending the CS Schema and code base in order to: acquire these additional fields on user registration, enable modification of these fields in the users control panel, display the new fields in the public view of the user’s profile, and display the data for the user in forum posts."
Let me know what you think. I think I'll post a new thread here to let people know it's available.
Just wanted to say thank you. You said you would post on this and you did and on schedule at that. I like the full integration into cs chameleon controls and all. This how to was long overdue.
oh yeah and the navigation on your site is rather slick too
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com