hgs yükleme
My Cart (0)  |  My Orders  |  My Downloads  |  My Auction  |  My Account  |  Help

Login |Register        Search

How to exclude users from DNN 7.2 search

                Print      Add To Favorite     Add To Watch List     Contact Author

Creator: host   5/15/2014 4:03:04 AM    Author: Sebastian Leupold   Source: http://www.dnnsoftware.com/community-blog/cid/154951/exclude-users-from-search-in-dnn-72   Views: 1933    0    0  
DNN 7.2 DNN Search

DNN 7.2.0 introduces a new feature, which includes user data in search (even for upgraded websites), i.e. entering "host" in search will provide you with a link to host user profile in default website.

While this might be a great feature for sites hosting communities, most of the websites of my clients just include a few admin users, who don't want to get exposed their data in website search. Other sites do provide user accounts for newsletter signup and don't want to expose this data via site search (in Germany, site owners may even get fined, if the user didn't consent to his data being published).

The easiest option to exclude all users from is disabling user data from being included in search results via UI:

  • Go to search results page (either in Admin > Pages or by entering a term into the search box
  • Switch to edit mode and enter module settings of search results
  • in tab "Search Results Settings", open drop down list for setting "Results Scope for Content Type(s)"
  • unselect "users"

Unfortunately, this will not stop users from being indexed (by an expensive stored procedure), i.e. their data copied from the database into the search index files. If you want to prevent this, run the following statement from Host > SQL:

ALTER PROCEDURE {databaseOwner}[{objectQualifier}GetAvailableUsersForIndex] @PortalId INT , @StartDate DATETIME , @startUserId INT = 0, @numberOfUsers INT = 500 AS BEGIN SELECT UserID, DisplayName, '' AS FirstName, '' AS PropertyName , '' AS PropertyValue, 0 AS Visibility, Null AS ExtendedVisibility, Convert (DateTime, 0) AS ModifiedTime FROM {databaseOwner}[{objectQualifier}Users] WHERE userId = 0 END

 (btw: thanks to Vicenç Masanas, for the great overhaul of this module).

If you now re-index your site (in Admin > Search Admin, by pressing "Re-Index Content", all user data will be excluded from the index.

PS: I am well aware that NSA might not appreciate this hint...

Rating People: 2   Average Rating:     

     DnnModule.com is built to provide DNN quality modules and DNN skins, some of them are free, some not. We wish these stuffs (free or not ) can be useful to you.

     Besides that, we also provide a full range of professional services, ranging from web site build, seo, system management, administration, support, senior consultancy and security services. We act as if your development project or network was ours, with care and respect. We are not satisfied until it works the way you want it to, and we don't silently ignore found issues as somebody else's problem.