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  |  

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


  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

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.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
SteadyRain
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Help Module [Le...  How Can I Delete a User who Registered with an Asterisk in Username?
Previous Previous
 
Next Next
New Post 2/9/2006 5:12 AM
User is offline Jan Bottorf
1 posts
10th Ranked


How Can I Delete a User who Registered with an Asterisk in Username? 
We are currently allowing students to register at the login page, and then I go in and Authorize them.  Last night, a student registered and put an * in her username, and now I get a Critical Error when I try to pull up Page 8 of my user list because that is the page she is on.  I can't figure out how I can either edit her username to remove the asterisk or delete her altogether (hopefully retrieving her email address first so that I can email her and tell her to pick a different username with no asterisk this time). 
 
New Post 2/9/2006 4:17 PM
User is offline Scott Willhite
2158 posts
www.alkihomes.com
5th Ranked










Re: How Can I Delete a User who Registered with an Asterisk in Username? 

Greetings...

If you have access to SQL Query Analyzer, this script will update her userid for you ( you'll have to notify her of the change ).  Note that this SQL handles the DNN forums too... if you don't use them, take this bit out ( highlighted ).

This should not cause an error... and should be considered a bug, in my estimation.  Please feel free to log this problem at http://support.dotnetnuke.com.  We appreciate your help.

Cheers


DECLARE @OldUsername varchar(50)
 DECLARE @NewUsername varchar(50)
 SET @OldUsername='enter old username here'
 SET @NewUsername='enter new username here'

BEGIN TRAN
 update aspnet_users
 set UserName = @NewUsername, LoweredUsername=lower(@NewUsername)
 where lower(UserName)=lower(@OldUsername)
 IF @@ROWCOUNT=0
  PRINT 'User ' + @OldUsername + ' not found in aspnet_users table.'
 ELSE
  PRINT 'User ' + @OldUsername + ' changed to ' + @NewUsername + ' in aspnet_users table.'
 update users
 set Username = @NewUsername
 where lower(UserName)=lower(@OldUsername)
 IF @@ROWCOUNT=0
  PRINT 'User ' + @OldUsername + ' not found in users table.'
 ELSE
  PRINT 'User ' + @OldUsername + ' changed to ' + @NewUsername + ' in users table.'
 update forum_users
 set alias=@NewUsername
 where lower(alias)=lower(@OldUsername)
 IF @@ROWCOUNT=0
  PRINT 'User ' + @OldUsername + ' not found in forum_users table.'
 ELSE
  PRINT 'User ' + @OldUsername + ' changed to ' + @NewUsername + ' in forum_users table.'
If @@ERROR=0
 BEGIN
  COMMIT TRAN
  PRINT 'username change committed'
 END
ELSE
 BEGIN
  ROLLBACK TRAN
  PRINT 'username change rolled back'
 END
GO


Scott Willhite
DotNetNuke Corp.

It is only with the heart that one can see rightly... what is essential is invisible to the eye.
~ Antoine de Saint-Exupéry
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Help Module [Le...  How Can I Delete a User who Registered with an Asterisk in Username?
 


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.

 


PointClick DotNetNuke Solutions
PointClick Technologies provides high-end DNN Hosting for businesses.
PointClick.Net Hosted Solutions
Active Modules, Inc.
Creators of Active Forums, the best forum module for DotNetNuke
www.activemodules.com
DotNetNuke Marketplace - Modules & Skins
The DotNetNuke Marketplace is the official e-commerce gateway for the DNN ecosystem. It's the place to buy and sell DotNetNuke modules, DotNetNuke skins, and other DNN offerings.
DotNetNuke Marketplace

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