Create a detailed user profile with composite c1

How would I create a detailed user profile with composite c1? In the profile will include:

  • User name, age, favorite articles, vote count, article written
  • Real name, comments by the user, etc.

Is this possible to do in composite c1?

Answers


C1 holds the username and usergroup in a Composite datastore:

~\App_Data\Composite\DataStores\Composite.Data.Types.IUser_Published.xml

The development of C1 continues at a great pace and therefore it is not recommended to alter any of the core workings of C1 as the likelihood of future upgrades could overwrite your changes or at least make it difficult to upgrade.

I solved the detailed user profile requirement by creating a new Global datatype I named simply "MyData.Users", holding the users first and last name and lots more different profile details. I ensured that my new Users datatype had a Unique Identifier GUID field, to record the GUID of the IUser unqiue id from the Composite.Data.Types.IUser_Published.xml store.

Creating your own separate datatype within C1's console/dashboard using the naming conventions as recommended in C1 documentation ensures that you can easily identify your own datastores but also that those datastores become available within C1 everywhere so that you can easily attach functions etc to set;get; your custom data.

By calling the C1 built in class UserValidationFacade in the following way: var userName = UserValidationFacade.GetUsername(); in your codebehind you can identify the currently logged in user's Username and GUID.

Then pull the profile data from the correct row in the MyData.Users datatype matching the Username/GUID to display in any way that you like within your website. ;)

C1's own forum has many great answers too with a great bunch of folk helping each other: http://compositec1.codeplex.com/discussions

I have used this method to create a sophisticated profile which you can freely register and then see in this MyRentals site


Need Your Help

How to save class with master/detail

c# methods save master detail

This is my class Record which can be master/detail/details

How to create table from Hibernate POJO class ? How to implement reverse enginnering strategies in Hibernate?

java hibernate reverse-engineering

I have witten the POJO class, *.cfg.xml file, *.hbm.xml file and hibernate code to retrieve data.