0
votes

I'm writing a DNN-module for accessing FogBugz that will pull issues from the group related to the currently logged in DNN user on a Fogbugz server.

Using this code snippet I have created a Module for adding the related users to my DNN database programmatically from an XML file stored on the server.
(It adds about 180 Users to the database)

The Fogbugz groups are identified in Fogbugz as unique number.

Question:

Now my question is: What is the best way to associate the Fogbugz group id with the related DNN user for purposes of displaying Fogbugz Issues in the portlet/module?

The method should be one that is familiar to Module Developers so that if anyone else needs to use this module eventually, they can do so in a recognizable manner.

I have several ways I can think of associating the users and the groups and these are as follows:

  • Using a Fogbugz-DNN-module related table and adding to it a foreign-key to the aspnet_Users table using the fields: Application_Id, and/or User_id.
  • Using the DNN-API to store Personalization Information for each portlet/module used by a user.

That said I'm not entirely sure how to add Personalization Information to a module instance for a user when I'm adding users.

3
You could add a custom profile property.notandy
I found a PersonalizationController and PersonalizationInfo class which appear to do the job. Thanks!leeand00

3 Answers

3
votes

The method should be one that is familiar to Module Developers so that if anyone else needs to use this module eventually, they can do so in a recognizable manner.

Your best bet here will be to use custom profile properties to store any data about users. This is the likely the first place other developers will look, and is created expressly for situations such as these.

0
votes

In my apps I use a module related table (a "Fogbuz-DNN-Module" table as you mentioned) and add a field that is used to store the DNN UserID. This way I can relate the "DNN USerID" with my related data and or custom id. When a user logs onto the website I can ten use the "DNN USerID" to attain the information I need and if I need to update or delete the user from the portal I can get the "DNN USerID" using the custom information.

0
votes

Ideally you want to create a profile property. To do this first you add the property definition in "User Accounts", under the "Edit Profile Property" option within that page.

Once that has been done you can add various lines similar to this:

oUser.Profile.SetProfileProperty("PropertyName", "PropertyValue");

within your create code to set the various properties that are non-standard.