Changing a user's linked Steam account

The following small guide can currently only be done by people with access to the Rails console on the ozfortress.com machine. By doing the below, you are setting the steamid64 of the first user to not a steamid64 temporarily, then swapping the steamid64 of the second account (typically the newer account) to the first account (usually the old account), then swapping the steamid64 of the old account to the second/new account.

Some things to keep in mind: - Users who are still logged in should be ok and will likely still be logged in via their other account, but when signing in via their new one it should sign them into the one they got swapped now.

Steps:

  1. Change directory into /opt/citadel/current.
  2. Open Rails console via RAILS_ENV=production bundle exec rails c (will need to make sure your user has PATH setup correctly).
  3. Open user pages on ozfortress.com and find the users, this way you can make sure you are getting the correct info and can refresh to check that steps 5 to 7 are applying.
  4. u1 = User.find(userID) & u2 = User.find(userID).
  5. u1.update!(steam_id: 3) (Note: The command will fail if you try to set the steamid64 in this step to either of the accounts IDs, as you need to essentially "clear" one first).
  6. u2.update!(steam_id: steamid of account 1).
  7. u1.update!(steam_id: steamid of account 2).

Once the steps above are done, the accounts should be swapped. Please also make an Admin Comment on both profiles, noting which way the accounts were swapped and to which account (please link them), so we all know who and why they were swapped.