Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Member specific custom modulesMember specific custom modules
Previous
 
Next
New Post
10/12/2006 5:10 PM
 

Hello :)

Any pointers on how to create custom modules for a registered member/user?

Scenario:

A user will register with an extra field as part of the registration.

This extra field will be used to identify the user (Almost like a social security number, a unique number).

Information will then be uploaded and can be linked to the registered user via the the unique number.

What would be a good solution to the scenario above?

Any help or input appreciated.

Joffies

 
New Post
10/13/2006 1:28 PM
 

If you want to extend the profile properties, you can just use "Add Property" from the Admin -> Users -> Manage Profile.

I don't really see what that has to do with identifying the user, though.  It's easy to identify a specific user simply using UserID; that's always unique.

As for a solution to the scenario, it really depends on what you mean by "information will then be uploaded".  Are you talking about a file, multiple files, database data, etc?  It would be a pretty simple module to just have an Edit form that allowed you to input data and/or upload documents.  If one of these fields was something like "Access for user:" and you selected the authorized user, then you could write your View page in a way that when a logged in user access your module, they see the information you input/uploaded.  Is that what you're talking about?

 

 
New Post
10/14/2006 7:41 AM
 

Thanks for the reply Professor

Sorry for not explaining myself more clearly;

I want to create a module that will display outstanding parking fines;

  • A user will have to register with two extra custom properties/fields (Vehicle Registration and a National Identity number). I will add these through Admin -> Users -> Manage Profile.
  • Information will uploaded, either by manual input or via an import to a database table. (I will create seperate modules to do this). The source of the parking fines information obviously dont know the Unique DNN id so they will only provide, either the Vehicle Registration or a National Identity number.
  • When a user is logged in, he/she will only see information that relates to them.

How can I access the two custom fields for a user in code to retrieve only user specific information?

 
New Post
10/14/2006 1:10 PM
 

Ok, still pretty easy.  Per usual, there are multiple ways to skin this cat.  First, the easy answer, 

"How can I access the two custom fields for a user in code to retrieve only user specific information?"

To extract / set custom profile information, you can use:

UserInfo.Profile.GetPropertyValue(Name)

and

UserInfo.Profile.SetPropertyValue(Name, Value)

Now all you have to do is write your modules.  You can do this with one module that has two definitions: one to enter details for a parking infraction and a second for user to view/pay? their infractions and fine.  Doing it this way you are really going to end up with two view modules.  The benefit is it will be easier to access data to/from each of them because it's all in the same class.  This should be pretty straight forward. 

What I would do is write the infraction entry page first.  This is pretty much a simple form that includes Vehicle Registration and/or National Identity Number.  Once you have your parking infractions table, all you need is a view page for users to find theirs.  This module needs some logic to retreive the current logged in user's extra profile fields.  Maybe something like:

VehReg = UserInfo.Profile.GetPropertyValue("VehReg")
NatID = UserInfo.Profile.GetPropertyValue("NatID")

Then you just query the table you stored the infraction data in and look for a match on either of these two values.

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Member specific custom modulesMember specific custom modules


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out