code: public static function getAuthUsername()
      {
          $result = null;
          if (isset($_SERVER['PHP_AUTH_USER'])) {
              $result = $_SERVER['PHP_AUTH_USER'];
          }
          if (trim($result) == '') {
              $result = null;
          }
          return $result;
      }
docs: Get auth username.
  
  @return string|null