Sunday, September 05, 2010
  Search
 
Register
Login
 
DotNetNuke 5 Cambrian Extropy Skin Features and Limitations
The new DotNetNuke Extropy skin looks very cool from a distance...leaps and bounds above the old default blue skin. But, it's got some limitations you should know about upfront.

Find this article and more in the category

Read This Article . . .

Upgrading to DotNetNuke Cambrian 5.0 from DotNeNuke 4.x
If you're looking to try out the new DNN Cambrian package, you can upgrade previous DotNetNuke installations with the following steps. Remember, as of right now, the DNN 5.0 Cambrian package availabl...

Find this article and more in the category

Read This Article . . .

Fixing IE's Hover Problems in DNN
 So you have designed a great skin, skin object or module for DNN and it uses the :hover attribute and looks fantastic in Firefox. Now, you find out that nothing works in IE because IE doesn't suppor...

Find this article and more in the category

Read This Article . . .

Quick Check for Troubleshooting the CodeEndeavor Ajax Templates
I haven’t just installed the the template and created a module out of the box yet. However, I have come across a few things that I know to check and fix and I’m up and running in no time at all. If y...

Find this article and more in the category

Read This Article . . .

Dude, Where’s my web.config file? Resolve Installation DNN Error Message: BC30451: Name 'Config' is not declared
Sometimes troubleshooting DNN errors can be a royal pain. Fortunately, if you know what you're looking for installation errors are usually pretty easy to resolve. Unfortunately, if you don't know wha...

Find this article and more in the category

Read This Article . . .

Customize Your DotNetNuke Installation
Do you ever get tired of installing DotNetNuke just to go and change the same properties over and over? Why not just customize your install and skip the drudgery all together…

Find this article and more in the category

Read This Article . . .

How to Utilize AjaxToolKit with DotNetNuke Portals
Integrating the AjaxToolkit into DotNetNuke modules is super easy. But, can be frustrating if you're not sure how. Find out how to Ajax enable your modules in less than 5 minutes now!   The ...

Find this article and more in the Module Development category

Read This Article . . .

Resolving Troubles with DNN User Controls During Module Development & Compilation
So, you've created a module in a separate project using some DNN User Controls and now you're receiving errors and can't compile? If you are using these controls (list below) on your module using ...

Find this article and more in the category

Read This Article . . .

Getting Aquainted with the DNN Classes
 So, you've decided to start checking out DotNetNuke development and you're wondering where to start, right? Well, it's easy to start taking a quick tour of the DotNetNuke classes now with the help o...

Find this article and more in the category

Read This Article . . .

Everything You Never Wanted to Know About the Config File
This is the "pre-" first installment in a series that will cover the parts of the web.config file to give you an idea of how to manipulate and customize your DotNetNuke portal. The web.config fi...

Find this article and more in the category

Read This Article . . .

Recently Added Articles

Minimize
Article List

 

Simple Intro to the DNN UserInfo Class

10/23/2008 2:20:23 AM - By Briana Tarrance

Category: DotNetNuke | | Comments 0

 

 

Related Links

New DNN developers often wonder how to expose information about logged in users to a custom DotNetNuke module. So, I threw together a very simple example to show how easy it is to begin using the built in user information features found in DotNetNuke.

First, I created a simple user control with nothing but a label on it:

<asp:Label ID="Label1" runat="server" Style="position: relative" Text="Label"/>

Then, on the codebehind, I added the following:

Imports DotNetNuke
ImportsDotNetNuke.Entities.Users
Imports System.Web.UI
 
Namespace Template
 
Partial Class UsersStuff
   Inherits Entities.Modules.PortalModuleBase
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Try
        If Not Page.IsPostBack Then
            'Hide update buttons from users not assigned to particular security groups
            If Not PortalSecurity.IsInRole("Registered Users") Then
                Label1.Text = "You must be registered to see this message"
            Else
                 Dim uInfo As UserInfo = UserController.GetCurrentUserInfo()
                 Label1.Text = "Hi, " & uInfo.DisplayName & " & _Is this still a valid address?  " & uInfo.EmailuInfo." and watch to see what methods the intellisense brings up to you for more user infomration.
                    "
    
           'type "
           End If
        End If
     
   
       Catch ex As Exception
          ProcessPageLoadException(ex)
       End Try
 
    End Sub
  
End Class
 
End Namespace

Finally, I dropped the module on a test page and here is a picture of the output:

 

 

 

 

 

And, that's how easy it is to get started with the UserInfo classes. DotNetNuke makes it easy to personalize your user experience

 


 
 
Copyright 2008 by Virtual-Essentials.com Privacy Statement    Terms Of Use