Brad Fitzpatrick (bradfitz) wrote in lj_dev,
Brad Fitzpatrick
bradfitz
lj_dev

renaming users

Avva,

In addition to everything we've discussed regarding username renames, consider also the following:

We don't want URLs to break, and since they now contain usernames, do this:

User "old (1)" wants to be become "new". User registers "new (2)", with same password and email address. User pays $10 change fee. Log to renames table (or whatever) the plan, and that its status is "pending". Nightly at 3am, do 'em all, then ljrpc sighup. Log to statushistory table for both users what happened.

New "old (1)" is "new (1)" and "new (2)" is "old (2)". But then we also want to set old's user.statusvis to be "R" (renamed) and set user.name to be "new".

Now whenever we encounter $u->{'statusvis'} eq "R", we can just look at $u->{'name'} to see where we have to redirect to. Make userinfo/users/talkread all HTTP redirect.

Sound good?
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 29 comments