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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Intended Behaviour of UserController.GetUserByUserName functionIntended Behaviour of UserController.GetUserByUserName function
Previous
 
Next
New Post
6/12/2008 1:06 AM
 

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 2:30 AM
 

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?


sunblognuke v5 for dnn

Ultimate Blogging Module for DotNetNuke Platform
The professional provider of DotNetNuke support, skin design and custom module development.

 
New Post
6/12/2008 1:24 PM
 

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
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
6/13/2008 12:16 AM
 

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
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Intended Behaviour of UserController.GetUserByUserName functionIntended Behaviour of UserController.GetUserByUserName function


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