Digital or IP phones? The solution will differ.
Get everyone logged in with their correct user.
Digital phones, go to System Status and the Extensions view. You can copy and paste it to Excel if you want, but compare the first 2 columns. The first column is the extension number assigned to the station port. The 2nd column is the User that is logged in. Make a list of the "base" extension numbers, in Manager change them to match the current users, and Merge the changes. In SSA you will see the 1st column extension numbers change to match the 2nd column extension numbers. Once they are square, they will remain after a reboot or a power failure.
(Hint, sort by Slot and then Port. Make a note of the "ID" for each slot and port in Manager, and reference the station ports by ID instead of extension number, otherwise you soon lose track of which extension numbers need to change. The ID numbers are 1-8 for Slot 1 Port 1-8, 25-32 for Slot 2 Port 1-8, 49-56 for Slot 3 Port 1-8, and 73-80 for Slot 4 Port 1-8. Expansion Modules are 101-130 for Expansion 1, 201-230 for Expansion 2, and so on.)
For IP phones, go into the Craft menu and select Logout. Confirm that you want to logout, and the phone will drop to the initial login prompt that you get when first installing. Put in the correct extension number and password and the phone will re-register as the correct extension, and remember it after the reboot/cold-start. If you have conflicting extension numbers, such as phone 100 has user 101 logged in, and phone 101 has User 100 logged in, you need to log them BOTH out first, and then log them in.