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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Get user list for a roleGet user list for a role
Previous
 
Next
New Post
11/25/2013 9:40 PM
 
I would recommend using the reports module.
to set it up for showing every roll and only the user name and roll you would enter this into the sql: SELECT users.username, roles.rolename FROM users, roles WHERE users.username = roles.rolename order by rolename

to set it up for showing only users within a roll (you can name the module as the role name, note* replace Administrators with the role name) you would enter this into the sql: SELECT users.username, roles.rolename FROM users,
roles WHERE users.username = roles.rolename and rolename = 'Administrators'

you can also use the same type of sql select in the dynamic forums module and have a drop down box. I use it to send mass emails for different committees (custom user profile) and here is what my select statement looks :
SELECT 'All Users' as QuestionOption, Stuff(
(SELECT N'; ' + email FROM users where email>=' ' FOR XML PATH(''),TYPE)
.value('text()[1]','nvarchar(max)'),1,2,N'') as QuestionOptionValue
Union
SELECT 'All Volunteers' as QuestionOption, Stuff(
(SELECT N'; ' + email FROM dbo.udf_UserProfileField(' Volunteer') AS Volunteer left OUTER JOIN dbo.vw_Users AS U ON Volunteer.PortalId = U.PortalId AND Volunteer.UserID = U.UserId where propertyvalue='True' FOR XML PATH(''),TYPE)
.value('text()[1]','nvarchar(max)'),1,2,N'') as QuestionOptionValue
union
SELECT 'All Committees ' as QuestionOption, Stuff(
(SELECT N'; ' + email FROM dbo.udf_UserProfileField('Committee') AS Committee left OUTER JOIN dbo.vw_Users AS U ON Committee.PortalId = U.PortalId AND Committee.UserID = U.UserId where propertyvalue>' ' FOR XML PATH(''),TYPE)
.value('text()[1]','nvarchar(max)'),1,2,N'') as QuestionOptionValue
 
New Post
11/25/2013 9:58 PM
 
Thanks for your advises. I will check this now.
 
New Post
11/25/2013 10:42 PM
 
Ill be around all night as I am working, if you need any help send me a message and I will give you my aol im or email which ever is easier for you
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Get user list for a roleGet user list for a role


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