views:

15

answers:

0

I'm not sure if I'm able to describe this clearly but I'm going to give it a shot...I've painted myself into a bit of a corner. Obviously there's a bug in my code, so pls pardon the newbie question...

My Rails app uses subdomains like this...

  • UserAccount1.theapp.com - Primary user
  • UserAccount1.theapp.com - Secondary user
  • UserAccount2.theapp.com - Primary user
  • UserAccount2.theapp.com - Secondary user
  • AdminUser.theapp.com - Application administrative user

As an AdminUser, I haven't built functionality to suspend UserAccounts but I do have the ability to change user profile info (username, password etc.). In order to clean up the inactive test accounts, I've resorted to changing the UserAccount1 Primary User username/password/email address, logging into the subdomain and cancelling the account. However, here's where I get stuck...

After canceling UserAccount1, I'm unable to login using my AdminUser account (throws 505 Error) at AdminUser.theapp.com or at the canceled UserAccount1 subdomain. The other accounts within the app don't appear to be impacted.

In the database (mysql), I can see that UserAccount1 was deleted (deleted_at date:time) and the AdminUser account appears to be active (deleted_at = NULL). I've also noted that the Primary User associated to the canceled account doesn't appear in the database.

My question is whether there's a way to change the UserAccount1 deleted_at field to NULL in order to see if I can get access to my AdminUser account. Or possibly somehow of adding the User record back into the database. When I originally ran into this problem I banged around for a while before doing a cap deploy:rollback which for some reason gave me access. I'm unsure whether that was actually a fix but I was able to login after that...it didn't work this time. Any other ideas that might get me back on track?

Thanks in advance!