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  |  

telerik -- supercharge your DNN websites
  Ads  
 


  Sponsors  

Meet Our Sponsors

SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Intended Behaviour of UserController.GetUserByUserName function
Previous Previous
 
Next Next
New Post 6/11/2008 11:06 PM
Unresolved
User is offline r_honey
133 posts
9th Ranked


Intended Behaviour of UserController.GetUserByUserName function 

I am using UserController.GetUserByUserName(), and whether I pass True or False to isHydrated, the results remain the same. When I analyzed core SqlDataProvider, I found that after setting isHydrated to False, the Membership Property of UserInfo should not have been hydrated.

Is that true?? If yes, then why is still Membership being filled even after setting isHydrated to False?

Secondly, I want to find out, whether a User exists across any Portal. I sent the username to this function (UserController.GetUserByUserName) & set the PortalId to -1. I indeed got a UserInfo object even if that user is not registered with the current portal. Is that the intended behavious of this function, or a side-effect of some other mistake I am making in the process???

 
New Post 6/12/2008 12:30 AM
User is offline baldwin
115 posts
www.dnnsun.com
9th Ranked


Re: Intended Behaviour of UserController.GetUserByUserName function 

I am also confused with the method, the similiar methods of the core framework is as following:

do you notice the methods "GetTabModules" of the ModuleController? it just get the modules from the cache. but if I had deleted the target module manually, next time I call the method the deleted module still exist in the cache. it looks like the core did not clear cache, so I want to call the method DataCache.ClearModuleCache(TabId) to do the work but it did not make any changes.
do you have any clue?


www.dnnsun.com:The professional provider of DotNetNuke support, skin design and custom module development.
The professional provider of DotNetNuke support, skin design and custom module development.
 
New Post 6/12/2008 11:24 AM
User is offline William Severance
842 posts
www.wesnetdesigns.com
7th Ranked






Re: Intended Behaviour of UserController.GetUserByUserName function 

The read only property Membership of the UserInfo class implements a "lazy loading" or "load on first access" pattern such that when the Membership property is first referenced in your code, its data (as contained in the UserMembership class) WILL be automatically hydrated if it has not already been hydrated when the UserInfo class data was hydrated (such as when calling GetUserByUserName with IsHydrated set to TRUE.  Thus, it only appears that the Membership property has been hydrated when the IsHydrated parameter of GetUserByUserName was set to FALSE.

The GetUsersByUserName method seems to be returning the correct information - that is any users satisfying the Username match - regardless of PortalId when the PortalId parameter is set to -1.  Is you want to check registration within the current portal, you would have to supply the current PortalId.


Bill, WESNet Designs
 
New Post 6/12/2008 10:16 PM
User is offline r_honey
133 posts
9th Ranked


Re: Intended Behaviour of UserController.GetUserByUserName function 

When I checked the core code, I found it was assiging value to Username Member of Membership property (without consulting isHydrated), thus leading to the "complete loading" of the Membership property leaving isHydrated parameter irrelevant, as Membership would always be hydrated, due to a reference to "Membership.Username" in the GetUsersByUserName method.

Wonder whether the developer himself did not figure this out, that isHydrated in this case would not make a difference!!!

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Intended Behaviour of UserController.GetUserByUserName function
 


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.

 


Digicon: DotNetNuke design and development
Digicon is based in Brisbane, Queensland, Australia
digicon.com.au
Live Visitor Tracking & Live Chat For DotNetNuke
Track your visitors in real time and add live chat for sales & support. Free Trial.
www.whoson.com
SINA101
WANT A SPECial sIte iN TAIWAN?
sina101.com

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