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
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
 


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
626 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.

 


Powered by Adcuent®.Com
Adcuent® Consulting & Technology offers custom development web applications and hosting projects under the brand of Powered by Adcuent®.Com
www.adcuent.com
Easily Build DNN Solutions with XMod
XMod makes it easy to build news articles, house listings, custom feedback forms, product reviews and much more - without programming
www.DNNDev.com
Software Development and Integration with DNN
HNP Solutions focuses on the pragmatic use of technology and process to meet an organization's business objectives. HNP Solutions employs seasoned Enterprise and Solution Architects, Delivery Managers and QA & Business Leads. Our capabilities range from project assessments & recommendations, design & code reviews, to full program implementations. We also work with organizations in need of senior staff augmentation purposes in the areas of Enterprise and Solution architecture.
www.hnpsolutions.com

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