diff --git a/apps/settings/lib/Controller/AuthSettingsController.php b/apps/settings/lib/Controller/AuthSettingsController.php index 305908e5e0a74..7b693d7f271f3 100644 --- a/apps/settings/lib/Controller/AuthSettingsController.php +++ b/apps/settings/lib/Controller/AuthSettingsController.php @@ -156,9 +156,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, ]); }