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 ForumsReportsReportsListing Users (again?)Listing Users (again?)
Previous
 
Next
New Post
2/11/2007 3:10 PM
 
In the most recent version (4.4.2), I removed the filtering that was performed on the query to stop the use of 'EXEC', 'CREATE', etc. because only SuperUsers can create queries anyway. This may make it easier to do, because you could use dynamic SQL and temporary tables.

Andrew Nurse
DotNetNuke Core Team Member and Reports Module Project Lead
Microsoft Certified Professional Developer

 
New Post
2/11/2007 4:06 PM
 
My UserProfile module can display a list of users with a customizable template (so you can show any property etc) and search on anything. Ironically I just fixed the bug where it was including non-authorised users, but you can install the Trial and see how I have done it in the SQL...

Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
2/18/2007 7:13 PM
 

It's great to have a custom modul, but for those who have like me only a small needed amout of informations I post a basic SQL... that can help if you don't want to spend to much money just for one querry.

As I'm happy to work only in a single domain / single portal, I don't care about the modulID's, you should keep this in mind.

You can easy update the SQL statement with your ID's or extto had it with more fields. For every field that you want to add from the properties you need this part of SQL Code....
Replace the Country with your favorite name and replace the 29 with your Property ID of your field
Country= ISNULL
(
(
SELECT     UserProfile.PropertyValue
FROM         ProfilePropertyDefinition INNER JOIN
UserProfile ON ProfilePropertyDefinition.PropertyDefinitionID = UserProfile.PropertyDefinitionID
WHERE     (UserProfile.PropertyDefinitionID = 29) AND (ProfilePropertyDefinition.Deleted = 0) AND (UserProfile.UserID = Q.UserID) 
)
,
'not set'
)

 Full example:

Select
Q.DisplayName AS [Name]
, Country= ISNULL
(
(
SELECT     UserProfile.PropertyValue
FROM         ProfilePropertyDefinition INNER JOIN
UserProfile ON ProfilePropertyDefinition.PropertyDefinitionID = UserProfile.PropertyDefinitionID
WHERE     (UserProfile.PropertyDefinitionID = 29) AND (ProfilePropertyDefinition.Deleted = 0) AND (UserProfile.UserID = Q.UserID) 
)
,
'not set'
)
, Nationality= ISNULL
(
(
SELECT     UserProfile.PropertyValue
FROM         ProfilePropertyDefinition INNER JOIN
UserProfile ON ProfilePropertyDefinition.PropertyDefinitionID = UserProfile.PropertyDefinitionID
WHERE     (UserProfile.PropertyDefinitionID = 40) AND (ProfilePropertyDefinition.Deleted = 0) AND (UserProfile.UserID = Q.UserID) 
)
,
'not set'
)
, [Continental Federation]= ISNULL
(
(
SELECT     UserProfile.PropertyValue
FROM         ProfilePropertyDefinition INNER JOIN
UserProfile ON ProfilePropertyDefinition.PropertyDefinitionID = UserProfile.PropertyDefinitionID
WHERE     (UserProfile.PropertyDefinitionID = 41) AND (ProfilePropertyDefinition.Deleted = 0) AND (UserProfile.UserID = Q.UserID) 
)
,
'not set'
)
FROM
Users Q
INNER JOIN
UserProfile ON Q.UserID = UserProfile.UserID
INNER JOIN
UserRoles ON Q.UserID = UserRoles.UserID
GROUP BY
Q.UserID
, Q.DisplayName
, UserRoles.RoleID
HAVING     
UserRoles.RoleID  = 3

 
New Post
2/19/2007 7:02 PM
 

FANTASTIC - Than Q!

Cheers

Alex



Alex Shirley


 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsListing Users (again?)Listing Users (again?)


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