mass update of user logins

I am trying to script a mass update of usernames (logins) for some of my iMIS records.  They are quite a number of them (over 40,000 records).  Is it as straightforward as running an update script to update the userid column on usermain table and username column on the aspnet_Users table?

I have tried this on my test environment and iMIS seems to lose the user record after this update.  When I try to update anything on the user credentials page and save, I get the error message "Error: The user was not found".

Can anyone help please?

thanks,

Odoro

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Additional tables to update

There are additional tables to update, since some parts of the system still refer to the non-.Net tables:

 

  • Name_Security, Column: WEB_LOGIN
  • UserMain, Column: UserId
  • Users, Column: UserId
  • aspnet_Users, Column: UserName

 

For the record, the UserMain.ContactMaster column is what ties it back to the Name and Name_Security tables (by ID).  The only association in Users is with the UserId column matching.  Note that not every row in UserMain will have an associated row present in Users, or in Name_Security, but where such a row does exist, you'll have to make the associated update there as well.

 

 

How does this affect logged in users

Hi,

I realise this is an old thread and users may have moved on....

If you do use this logic, how to you handle modifying the login of a user who is logged in.

i.e. we're tying web login's to individual's email addresses.

If user updates their email address, we'll then trigger off the update of tables to set their new web login to match the new email address.

In testing, process works, but the cookie set on the user's browser causes the users next request against the imis website to fail with:-

An exception of type 'UserValidationException' occurred
Type: UserValidationException
Message: Validation Failed
Source: Asi

How have others gotten around this?

Regards,

Scott