Page MenuHomePhabricator

Make user.whoami obsolete, then freeze, deprecate, and remove it
Open, WishlistPublic

Description

phabricator 53bc57ecef8739c29105eb52b1f118c0402e2c6c (Sat, Apr 29)
arcanist ada63de9722e4b60ec9f0900a757b5b3873fc2f7 (Sat, Apr 29)
phutil d02cc05931b02c684d4c729510090591ca45f951 (Sat, Apr 29)

calling conduit methods for user.whoami vs user.search results in a field naming mismatch (whoami returns a "userName" field, search returns a "username" field)

This is pretty minor and easy to work around but consistency (where applicable) would be helpful when dealing with outputs from those calls.

Event Timeline

The pathway forward here is probably:

  • Allow user.search to accept viewer() as a constraint.
  • Freeze, deprecate, and remove user.whoami.
epriestley renamed this task from Field naming for user.whoami vs. user.search -> username/userName to Make user.whoami obsolete, then freeze, deprecate, and remove it.May 2 2017, 12:44 PM
epriestley triaged this task as Wishlist priority.

I assume based on your comment there isn't a good replacement for whoami until viewer is available on search? (aka I'll keep using whoami until viewer is available as an input to search)

Right, you can't user.search for the currently logged-in viewer. If you don't need to know this (you already know the right username or PHID) and were just using user.whoami for convenience you could switch today, but, e.g., in arc we rely on identifying the logged-in viewer with a Conduit call.

Thanks, I'll just keep an eye on this ticket and switch whenever I need to.