// Get the viewer if logged-in user, otherwise anonymous user $viewer = PhabricatorUser::getMostRecentViewer(); // Get the username of the viewer $username = $viewer->getUserName(); // Get the viewer's email address $email = $viewer->getPHID();In the above example, the `PhabricatorUser` class is used to get the most recent viewer, and then their username and email address are retrieved. This code is a part of the Phabricator package library of PHP, which is used for building web-based software platforms.