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.0Link to edit user profileLink to edit user profile
Previous
 
Next
New Post
1/6/2007 10:10 AM
 

In an administrative security level control of a module I'm building I want to provide in a GridView that lists statistics for each user of the module a direct link to allow administrators to edit the selected user's DNN profile.  Although the following code works well, I'm wondering the following:

  1. Is providing such a link a good idea?
  2. Can I rely on the module to edit a user's profile always having the FriendlyName of "User Accounts"
  3. Can I rely on their being one and only one instance of this module and that it's TabID is the correct one?
  4. Is there a better or more standard way of doing this?  I find that the PortalSettings.UserTabId always returns null unless a non-default tab has been selected for the User Accounts page.

Code:

Dim UserID As Integer = CInt(gvUsers.SelectedValue)
If IsAdministrator Then
      Dim mc As New ModuleController
      Dim mi As Entities.Modules.ModuleInfo = mc.GetModuleByDefinition(PortalId, "User Accounts")
      If Not mi Is Nothing Then
           Response.Redirect(NavigateURL(mi.TabID, "Edit", "mid=" & mi.ModuleID.ToString, "UserID=" & UserID.ToString), True) 'Redirect to Admin->>UserAccounts tab
      End If
Else
      Response.Redirect(AccessDeniedURL("Only portal administrators may access user profiles"), True)
End If

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
1/7/2007 2:05 PM
 
  1. Why not? I don't see any drawbacks.
  2. No
  3. No
  4. Yes: Response.Redirect(NavigateUrl(PortalSettings.UserTabId, "Profile", "UserID=" & UserID.ToString), True
 
New Post
1/7/2007 2:22 PM
 
imagemaker wrote

...  I find that the PortalSettings.UserTabId always returns null unless a non-default tab has been selected for the User Accounts page....

I am not sure whether I get this: PortalSettings.UserTabIs is working for me as expected.

 
New Post
1/8/2007 12:36 PM
 
Some sites use third party registration/profile editing modules such as our product User Attributes. If you intend to distribute this module I’d recommend adding a module setting to specify a TabId and a query string parameter name to pass the UserId/UserName. Then the admin can have your module redirect to any tab they want and pass the Username/ID as a query string parameter.

Qualtiy DotNetNuke modules and custom development; we've been serving the DNN community for over 2 years and have hundreds of satisfied customers. Let us serve you today.
 
New Post
1/9/2007 3:42 PM
 
Stefan,
Is there a particular place where one could go to learn more about linking in DNN? Also, where might I find a reference to the NavigateUrl() method? I see numerous references to this method, and it seems like many people are unfamiliar with how to really use it (myself quite obviously included). Thanks much in advance.

- Lance 'ji' May
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Link to edit user profileLink to edit user profile


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