From 33587e4c75dfc63b0c1e6f2a3c811393246f1514 Mon Sep 17 00:00:00 2001 From: "kavita.sonawane@t-systems.com" Date: Wed, 20 Jul 2022 11:42:30 +0530 Subject: [PATCH] Settings-Replace username with email address --- apps/settings/lib/Controller/AuthSettingsController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/settings/lib/Controller/AuthSettingsController.php b/apps/settings/lib/Controller/AuthSettingsController.php index 38db7be1e9187..dd144db96c930 100644 --- a/apps/settings/lib/Controller/AuthSettingsController.php +++ b/apps/settings/lib/Controller/AuthSettingsController.php @@ -157,9 +157,10 @@ public function create($name) { $this->publishActivity(Provider::APP_TOKEN_CREATED, $deviceToken->getId(), ['name' => $deviceToken->getName()]); + $user = $this->userSession->getUser(); return new JSONResponse([ 'token' => $token, - 'loginName' => $loginName, + 'loginName' => $user->getEMailAddress(), 'deviceToken' => $tokenData, ]); }