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 OnlineUsers which is registered on more than one portal is duplicated for each portal in 4.9.4Users which is registered on more than one portal is duplicated for each portal in 4.9.4
Previous
 
Next
New Post
6/23/2009 2:05 PM
 

Sebastian Leupold wrote
 

 CodeSnake wrote
 

 

No, this error occurs when superusers are excluded from the list.

IF @IncludeHosts = 0

 

right, and the error is in the ELSE clause...

No, the error is in IF clause. Here's the procedure code:

IF @IncludeHosts = 0
BEGIN
SELECT
 UO.UserID,
 U.UserName,
 U.DisplayName,
 U.FirstName,
 U.LastName,
 U.FirstName + ' ' + U.LastName AS FullName
FROM
 dbo.UsersOnline UO INNER JOIN dbo.Users U ON UO.UserID = U.UserID INNER JOIN dbo.UserPortals UP ON U.UserID = UP.UserID
WHERE
 UO.PortalID = @PortalID AND UO.UserID = U.UserID AND UP.Authorised = 1 AND U.IsSuperUser = 0 -- Inner Join takes care of SU = 0, but for sanity.
END
ELSE
BEGIN
SELECT DISTINCT
 UO.UserID,
 U.UserName,
 U.DisplayName,
 U.FirstName,
 U.LastName,
 U.FirstName + ' ' + U.LastName AS FullName
FROM
 dbo.UsersOnline UO INNER JOIN dbo.Users U ON UO.UserID = U.UserID, dbo.UserPortals UP
WHERE
 UO.PortalID = @PortalID AND UO.UserID = U.UserID AND UP.Authorised = 1

I have solved this problem by replacing 'SELECT' in the first case with 'SELECT DISTINCT'.

 
New Post
6/23/2009 2:53 PM
 

you are right, I uploaded a fixed version of the script for 4.9.4 at http://support.dotnetnuke.com/Default.aspx?p=13&i=10266,

so you can easily download and load into Host ::SQL to run as script.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsUsers OnlineUsers OnlineUsers which is registered on more than one portal is duplicated for each portal in 4.9.4Users which is registered on more than one portal is duplicated for each portal in 4.9.4


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