Skip unknown usernames rather than print "<unknown>".

Not sure what the original motivation for printing <unknown> was (it
shouldn't ever come up in normal operation, only if something weird
happens like we manually unset a user's username in the database). But
it's now rather inconvenient because we don't yet clean up deleted
organizations from a site, so you would see <unknown> for every
authorized organization that has been deleted. While we should
eventually clean up deleted organizations from a site's
"authorized_orgs" field, for now this will clean up the output of this
command.
This commit is contained in:
Emily Stark
2014-08-01 17:03:47 -07:00
parent 96019ffe66
commit d785da8dcd

View File

@@ -631,9 +631,7 @@ var listAuthorized = function (site) {
process.stdout.write((auth.loggedInUsername() || "<you>") + "\n");
_.each(info.authorized, function (username) {
if (! username)
process.stdout.write("<unknown>" + "\n");
else
if (username)
process.stdout.write(username + "\n");
});
return 0;