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  |  

DotNetNuke Marketplace
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Check uniqueness of username across all portals
Previous Previous
 
Next Next
New Post 6/9/2008 10:01 PM
User is offline AliCommerce
198 posts
www.AliCommerce.com
9th Ranked


Check uniqueness of username across all portals 
Modified By AliCommerce  on 6/10/2008 1:06:36 AM)

Can anybody tell me if there is a function which checks uniqueness of a username across ALL portals?  What I want to achieve is to make sure a username doesn't exist before I create a user account. It seems to me user creation will fail even the username exists in other portals.

Thanks in advance.


Frank Wang
AliCommerce
The best DNN shopping cart module. 100% satisfaction is guaranteed.
 
New Post 6/10/2008 6:19 AM
User is offline Rafe Kemmis
75 posts
www.kemmis.info/blog/
10th Ranked


Re: Check uniqueness of username across all portals 

If you wish to manually check all the portals for a username, you can first get a list of all the portals:

ArrayList portals = new DotNetNuke.Entities.Portals.PortalController().GetPortals();

Then you can loop through the PortalInfo objects and pass the portalid to the GetuserByName method on a DotNetNuke.Entities.Users.UserController object, which will return a UserInfo object... if the object is not null and has a userid > 0, then a user exists with that username.

Hope this helps.

 
New Post 6/10/2008 8:32 AM
User is offline Brandon Haynes
646 posts
everysport.net
7th Ranked


Re: Check uniqueness of username across all portals 

Hi Frank,

If you happen to be using AspNetSqlMembershipProvider and won't be migrating away from this provider in the future, you could use this functionality to determine username uniqueness.  This provider includes a clustered, unique index over ApplicationId and the lower-case username.  Since DNN only uses one ApplicationId across ALL portals ("DotNetNuke"), you can safely use the ASP.NET provider-based GetUserByName (not the DNN membership provider though!) to query username existance.

Obviously, other provider implementations may handle username uniqueness differently, so switching providers might result in a change in behavior.

Hope this helps!

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post 6/10/2008 4:34 PM
User is offline AliCommerce
198 posts
www.AliCommerce.com
9th Ranked


Re: Check uniqueness of username across all portals 
Modified By AliCommerce  on 6/10/2008 7:35:58 PM)

Many thanks for help. Much appreciated.


Frank Wang
AliCommerce
The best DNN shopping cart module. 100% satisfaction is guaranteed.
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Check uniqueness of username across all portals
 


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.

 


Get Smarter Mail, SmarterStats, SmarterTickets
Windows mail server, web log analytics, and customer service management software - Free Editions Available!
www.smartertools.com
DotNetNuke Modules, Skins, Training and Consulting
If you want DotNetNuke done right then look no further. Developed Solutions provides module development, skin design, user and developer training and consulting. Based in Adelaide, Australia, we offer our services worldwide.
www.developedsolutions.com.au
Venexus, Inc.
Need custom a custom DotNetNuke module? From module planning to deployment, including training and support, Venexus developers deliver end-to-end web solutions on time and on budget.
www.venexus.com

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