回答:
これをクラスのコンストラクタに追加する必要があります
protected $authSession;
public function __construct(
    ....
    \Magento\Backend\Model\Auth\Session $authSession, 
    ....
) {
    ....
    $this->authSession = $authSession;
    ....
}
次に、このメソッドを作成します
public function getCurrentUser()
{
    return $this->authSession->getUser();
}
これにより、現在ログインしている管理者が表示されます。またはの
ような詳細を後で取得できます。$user->getUsername()$user->getEmail()
現在の管理ユーザーの詳細を取得するにはどうすればよいですか?
コントローラーにバックエンドセッションを挿入する
public function __construct(
....
\Magento\Backend\Model\Auth\Session $authSession, 
  ....
 ) {
  ....
   $this->authSession = $authSession;
   ....
}
これを使用してユーザー名またはメールを取得します
 $this->authSession->getUser()->getUsername();
$this->authSession->getUser()->getEmail();
bin/magento setup:di:compile。そうしないと、「セッションなし」エラーが表示されます。