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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsUsers OnlineUsers OnlineQuick questions?Quick questions?
Previous
 
Next
New Post
1/17/2006 6:00 AM
 

Please can anyone tell me how i can obtain the current users id or username in dnn?? I.e. I am developing a user accounts module but i'm not too sure if the dotnetnuke.entities.users(userInfo)(usercontoller) classes can do this. I want to collect the user on the modules id or username, goto the database and check his organization id and then display only users with this id to him.

Question 1 .I  am developing a module based on the skeleton of the user accounts module. This module is for my clients in a manager security role i've created to be able to add, edit and delete new users based on their organization_Id a unique identifier feild I've implemented as well.

Question 2. i have duplicated the dotnetnuke.entities.users (userInfo), (Usercontroller),(membership) etc classes that run this in the core module, but I can't seem to assign my usermembership to microsoft.scalablehosting.security (usermembership) and (membershipcollection) like it is done in the core project. Obviously i cant see those methods so i don't know exactly what parameters it expects?? I've tried it in both c# and vb and it works perfectly as a core module that i can give security rights to anyone, but the main objective is for each organization manager (or anyone in this role) to only be able to view, edit and register their members details to my portal.

If anyone can give me some pointers i'd appreciate it.  

 
New Post
3/15/2006 2:43 PM
 

Try this

Imports DotNetNuke

Public MustInherit Class MyClass

  Private Sub MySub()

   ' Get the user information
   Dim oUserController As New UserControlloer
   Dim oUserInfo as UserInfo = oUserController.GetCurrentUserInfo()

   lblMyUsernameLabel.Text = oUserInfo.UserName

   ' do some other work ...

  End Sub

 

End Class

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsUsers OnlineUsers OnlineQuick questions?Quick questions?


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