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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Change User Name in user account...Change User Name in user account...
Previous
 
Next
New Post
5/5/2009 3:27 PM
 

Haven't been over here in a year, our site has been running great (DNN 4.7 Northstar Camaro Club) but I now have a question. One of our users sold his 1988 Iroc and would like to change his user name. Overall, I would normally just tell him to sign up again, but he doesn't want to loose everything he has done on our forum (YAF forum module). How do I change his user name? I haven't found anywhere to do that in DNN4.7.

 

Oh, and before everyone jumps on me, I tried several searches, they all time out and give me an error...


Visit our Website at www.northstarcamaroclub.com
 
New Post
5/5/2009 3:37 PM
Accepted Answer 

First thing:  Searching the Forums
Don't bother with the forum search feature (at least the current version).  Instead use Google with appropriate filters to constrain results to the DNN forums or keep a link to http://searchdotnetnuke.com which does the Google search / filtering for you.
 
 
Second Thing:  Changing User Name
Answered many times before (as you already surmised).  Here's one answer:
 
 http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/36/threadid/27822/scope/posts/Default.aspx

 
Cheers!
-mamlin


esmamlin atxgeek.me
 
New Post
5/6/2009 3:35 PM
 

Hmmm, the solution in the link worked like a charm! I copied the following into the SQL query page (Host Access required):

declare @oldName nvarchar(128)
declare @newName nvarchar(128)
declare @error_var int, @rowcount_var int
declare @newNameCount int

select @oldName = 'jsmith'
select @newName = 'johndoe'


begin transaction

 select @newNameCount = count(*)
  from Users
  where Username = @newName
 if @newNameCount > 0
 begin
  RAISERROR('Username already exists. @newName=%s', 10, 1, @newName)
  ROLLBACK TRANSACTION
  RETURN
 end

 update Users
 set Username = @newName
 where Username = @oldName
 
 SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
 IF @rowcount_var <> 1 OR @error_var <> 0
 BEGIN
  RAISERROR('Could not Update User.Username. @oldName=%s', 10, 1, @oldName)
  ROLLBACK TRANSACTION
  RETURN
 END
 
 
 update aspnet_Users
 set
  Username = @newName,
  LoweredUserName = LOWER(@newName)
 where LoweredUserName = LOWER(@oldName)
 
 SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
 IF @rowcount_var <> 1 OR @error_var <> 0
 BEGIN
  RAISERROR('Could not Update aspnet_Users.Username. @oldName=%s', 10, 1, @oldName)
  ROLLBACK TRANSACTION
  RETURN
 END

Commit transaction
go

Just change the red text to reflect the old name and the new one and ran it. Since we use YAF on our site, I did have to go into the YAF Admin and update the user name there, but that is easy. Thanks for the advice!


Visit our Website at www.northstarcamaroclub.com
 
New Post
5/6/2009 7:38 PM
 

Hi mamlin

Why don't you guys running the dotnetnuke.com site just swap the search forms for google search forms instead .... and make some more money in the process?

/Johan Säljstöd

 
New Post
5/7/2009 5:11 AM
 

 please be informed, that a new version of Forums module is about to be finished and released oon, which shall provide better search experience.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Change User Name in user account...Change User Name in user account...


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