We have some users where the profile page is visible, but neither login works for them nor can I administer them. It always results in a 404 page.
I went to the rails console and tried to look up the user by id and username:
 pry(main)> User.find_by(id: 2) => nil  pry(main)> User.find_by(username_lower: "juanettedoe") => #<User:0x00005622930e5770 id: 2, username: "juanettedoe", …
So, looking up via username works and it reveals the correct user id. But, looking up by user id does not result in the dataset. What can I do about it?