gjshah7254
8/5/2015 - 9:26 PM

SQL condition to get the role or site of a user in kenitco

SQL condition to get the role or site of a user in kenitco

SELECT *
  FROM 
    [dbo].[CMS_User] u
  INNER JOIN 
	  [dbo].[CMS_UserRole] ur
    ON 
  	  ur.UserID = u.UserID
  INNER JOIN 
	  [dbo].[CMS_Role] r
    ON
  	  r.RoleID = ur.RoleID
  INNER JOIN 
	  [dbo].[CMS_UserSite] us
    ON
      us.UserID = u.UserID
  INNER JOIN 
	  [dbo].[CMS_Site] s
    ON
      s.SiteID = us.SiteID