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...update usernamesupdate usernames
Previous
 
Next
New Post
10/4/2008 1:07 PM
 

I have a need to update a number of usernames.

If I update username in users, and username and loweredusername in aspnet_users ... will that be safe, and accomplish everything necessary?

 


pmgerholdt
 
New Post
10/4/2008 2:05 PM
 

Hi Michael,

Since you are clearly using the SqlMembershipProvider, so long as you don't have your database partitioned across multiple servers, this approach is just fine.  If you DID happen to have your database housed across multiple servers, then you would need to ensure that any changes are propagated properly (because the username is a component of the primary key). 

In virtually all circumstances, this change will be fine (with SqlMembershipProvider).  I understand that Microsoft would like to change this behavior, but has thus far balanced it against maintaining backwards compatibility.  Personally, I wish they'd bite the bullet already.

Hope this helps!

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post
10/4/2008 3:05 PM
 

Thanks, Brandon - definitely helpful.

Actually, this portal uses the ActiveDirectoryAuthenticationProvider. DNN accounts are created first time folks navigate to the site. However, I have a business need to create their accounts prior to the first time they come to the site for self-registration, so that account can be used in an Enterprise forms workflow.

I can use DNNMasters Membership Management Pro to import a userbase from Active Directory into DNN. Very nice.

But the ActiveDirectory provider creates accounts with the domain name prepended, and MM Pro won't do that without modifying source (which I don't care to do particularly). I've reviewed both of the tables (users and aspnet_users) and the active directory accounts exist in both, with the domain name prepended as part of the username. So I'm thinking that I can proceed in this manner with success.

Thanks again -


pmgerholdt
 
New Post
10/6/2008 12:13 PM
 

Hi Michael,

I wasn't aware that the ActiveDirectoryAuthenticationProvider used the SqlMembershipProvider tables (aspnet_users, etc) as a backing store. 

Your approach seems very reasonable.  Good luck!

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post
10/10/2008 3:10 PM
 

Interstingly, I have another similar but different project where I will be using the SqlMembershipProvider. But I'll be importing an initial userbase from an external system (not AD this time). The Usernames from that system will be familiar to the user, were suitable for their former location and use, but not something we want to stick them with permanently in the new system. However, it is important that we have strong identity integrity to the former system.

So I'm thinking to import and contact users to log on, and give them one opportunity to update their username. I'll store their initial username in a read-only location, and that will both provide the link to the previous system plus play a role in the permission to change the username(if same as current username, they can change it; if different, they already did. Saves me the effort of toggling an indicator.)

So I will wrap in a transaction the update of aspnet_user and user tables, and build a form in Enterprise forms which will execute a stored procedure to do the update either upon submit or upon an approval work flow step.

I know that the UserID, not the username, is the real key identifier for a user account. Thus I expect that it won't be a problem to change a username in this manner (even though it is not a built-in capability in DNN) while the user is logged on.

Does anyone more familiar with internals than I see a problem with this? Thanks -


pmgerholdt
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...update usernamesupdate usernames


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