Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

PortalWebHosting
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
Verndale
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  GetUsersByProfileProperty Help
Previous Previous
 
Next Next
New Post 6/20/2008 1:12 PM
Resolved
User is offline Rob Spotts
8 posts
10th Ranked


GetUsersByProfileProperty Help 

 

, 1, 1000, 2)

 

 

Hi Everyone,

 

I've created a custom user profile property called "Departments" which is a list of internal departments.  I'm trying to use the GetUsersByProfileProperty() method, but I can't seem to get it to work.  I've executed the associated stored procedure, and it works fine when I give it the appropriate arguements.  Can someone tell me what I'm doing wrong?  Arguments are hard coded, but PropertyValue argument will eventually will come from a DropDownList control.

 

 

 

alUsers = DotNetNuke.Entities.Users.UserController.GetUsersByProfileProperty(0,

Dim alUsers As New System.Collections.ArrayList"Departments", "6", 1, 1000, 2)

Thanks,

Rob

 

 
New Post 6/23/2008 1:43 PM
User is offline Rob Spotts
8 posts
10th Ranked


Re: GetUsersByProfileProperty Help 

I solved my problem after looking closely at GetUsersByProfileProperty() parameter list.  Maybe someone else my find this thread helpful.

Dim totalRecords As New Integer

alUsers = DotNetNuke.Entities.Users.UserController.GetUsersByProfileProperty(0,

"Departments", "6", 1, 1000, totalRecords)

 

 
New Post 6/23/2008 1:53 PM
User is offline Fooberichu
467 posts
www.seeleyware.com
8th Ranked


Re: GetUsersByProfileProperty Help 

I'm going to guess your formatting up above is not true to your actual code, but I've inserted a snippet below that should work for you (copied straight from my own code, just replacing the profile property name):

Dim tmpCount As Integer = 0
Dim tmpArray As ArrayList = DotNetNuke.Entities.Users.UserController.GetUsersByProfileProperty(portalId, "Departments", "6", 0, 100, tmpCount)

You'll note that I'm setting page 0 (it is returning on a base zero array, not base 1 like VB.NET typically is), 100 records though you can use your 1000, and then the tmpCount is how many are actually being returned and is passed by reference.  In other words, if only 2 actually came back, tmpCount would have been set to 2 during the call. 

Based on the weird formatting in your post, I'm not sure where the problem lies.

Hope that helps?


-- Fooberichu
http://www.seeleyware.com
 
New Post 6/30/2008 1:41 PM
User is offline Rob Spotts
8 posts
10th Ranked


Re: GetUsersByProfileProperty Help 

 

That did the trick!  Yes.  For some reason, the formatting of my code snippet got out of wack.  Thanks for the follow up!

Rob

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  GetUsersByProfileProperty Help
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DotNetNuke Web Hosting w/ ASP.NET 3.5
Unlimited email boxes, Unlimited databases, Unlimited domains. Plans start at $4.97
www.MyWinHosting.com
SteadyRain
Founded in 1999, SteadyRain has extensive experience delivering Internet technology strategies and solutions for a diverse client base, ranging from Fortune 500 firms to successful start-ups.
www.steadyrain.com
AfterImage Internet Consulting and SEO Services
AfterImage provides search engine optimization (SEO), Internet consulting and hosting services for the Windows platform (IIS, ASP, SQL Server).
www.afterimage.nl/

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP