aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Command/User/Profile.php234
-rw-r--r--core/l10n/bg.js13
-rw-r--r--core/l10n/bg.json13
-rw-r--r--core/l10n/ga.js5
-rw-r--r--core/l10n/ga.json5
-rw-r--r--core/l10n/nl.js1
-rw-r--r--core/l10n/nl.json1
-rw-r--r--core/l10n/ru.js5
-rw-r--r--core/l10n/ru.json5
-rw-r--r--core/l10n/sr.js6
-rw-r--r--core/l10n/sr.json6
-rw-r--r--core/register_command.php2
-rw-r--r--core/src/OC/eventsource.js4
13 files changed, 296 insertions, 4 deletions
diff --git a/core/Command/User/Profile.php b/core/Command/User/Profile.php
new file mode 100644
index 00000000000..fd5fbed08cd
--- /dev/null
+++ b/core/Command/User/Profile.php
@@ -0,0 +1,234 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OC\Core\Command\User;
+
+use OC\Core\Command\Base;
+use OCP\Accounts\IAccount;
+use OCP\Accounts\IAccountManager;
+use OCP\Accounts\PropertyDoesNotExistException;
+use OCP\IUser;
+use OCP\IUserManager;
+use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class Profile extends Base {
+ public function __construct(
+ protected IUserManager $userManager,
+ protected IAccountManager $accountManager,
+ ) {
+ parent::__construct();
+ }
+
+ protected function configure() {
+ parent::configure();
+ $this
+ ->setName('user:profile')
+ ->setDescription('Read and modify user profile properties')
+ ->addArgument(
+ 'uid',
+ InputArgument::REQUIRED,
+ 'Account ID used to login'
+ )
+ ->addArgument(
+ 'key',
+ InputArgument::OPTIONAL,
+ 'Profile property to set, get or delete',
+ ''
+ )
+
+ // Get
+ ->addOption(
+ 'default-value',
+ null,
+ InputOption::VALUE_REQUIRED,
+ '(Only applicable on get) If no default value is set and the property does not exist, the command will exit with 1'
+ )
+
+ // Set
+ ->addArgument(
+ 'value',
+ InputArgument::OPTIONAL,
+ 'The new value of the property',
+ null
+ )
+ ->addOption(
+ 'update-only',
+ null,
+ InputOption::VALUE_NONE,
+ 'Only updates the value, if it is not set before, it is not being added'
+ )
+
+ // Delete
+ ->addOption(
+ 'delete',
+ null,
+ InputOption::VALUE_NONE,
+ 'Specify this option to delete the property value'
+ )
+ ->addOption(
+ 'error-if-not-exists',
+ null,
+ InputOption::VALUE_NONE,
+ 'Checks whether the property exists before deleting it'
+ )
+ ;
+ }
+
+ protected function checkInput(InputInterface $input): IUser {
+ $uid = $input->getArgument('uid');
+ $user = $this->userManager->get($uid);
+ if (!$user) {
+ throw new \InvalidArgumentException('The user "' . $uid . '" does not exist.');
+ }
+ // normalize uid
+ $input->setArgument('uid', $user->getUID());
+
+ $key = $input->getArgument('key');
+ if ($key === '') {
+ if ($input->hasParameterOption('--default-value')) {
+ throw new \InvalidArgumentException('The "default-value" option can only be used when specifying a key.');
+ }
+ if ($input->getArgument('value') !== null) {
+ throw new \InvalidArgumentException('The value argument can only be used when specifying a key.');
+ }
+ if ($input->getOption('delete')) {
+ throw new \InvalidArgumentException('The "delete" option can only be used when specifying a key.');
+ }
+ }
+
+ if ($input->getArgument('value') !== null && $input->hasParameterOption('--default-value')) {
+ throw new \InvalidArgumentException('The value argument can not be used together with "default-value".');
+ }
+ if ($input->getOption('update-only') && $input->getArgument('value') === null) {
+ throw new \InvalidArgumentException('The "update-only" option can only be used together with "value".');
+ }
+
+ if ($input->getOption('delete') && $input->hasParameterOption('--default-value')) {
+ throw new \InvalidArgumentException('The "delete" option can not be used together with "default-value".');
+ }
+ if ($input->getOption('delete') && $input->getArgument('value') !== null) {
+ throw new \InvalidArgumentException('The "delete" option can not be used together with "value".');
+ }
+ if ($input->getOption('error-if-not-exists') && !$input->getOption('delete')) {
+ throw new \InvalidArgumentException('The "error-if-not-exists" option can only be used together with "delete".');
+ }
+
+ return $user;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output): int {
+ try {
+ $user = $this->checkInput($input);
+ } catch (\InvalidArgumentException $e) {
+ $output->writeln('<error>' . $e->getMessage() . '</error>');
+ return self::FAILURE;
+ }
+
+ $uid = $input->getArgument('uid');
+ $key = $input->getArgument('key');
+ $userAccount = $this->accountManager->getAccount($user);
+
+ if ($key === '') {
+ $settings = $this->getAllProfileProperties($userAccount);
+ $this->writeArrayInOutputFormat($input, $output, $settings);
+ return self::SUCCESS;
+ }
+
+ $value = $this->getStoredValue($userAccount, $key);
+ $inputValue = $input->getArgument('value');
+ if ($inputValue !== null) {
+ if ($input->hasParameterOption('--update-only') && $value === null) {
+ $output->writeln('<error>The property does not exist for user "' . $uid . '".</error>');
+ return self::FAILURE;
+ }
+
+ return $this->editProfileProperty($output, $userAccount, $key, $inputValue);
+ } elseif ($input->hasParameterOption('--delete')) {
+ if ($input->hasParameterOption('--error-if-not-exists') && $value === null) {
+ $output->writeln('<error>The property does not exist for user "' . $uid . '".</error>');
+ return self::FAILURE;
+ }
+
+ return $this->deleteProfileProperty($output, $userAccount, $key);
+ } elseif ($value !== null) {
+ $output->writeln($value);
+ } elseif ($input->hasParameterOption('--default-value')) {
+ $output->writeln($input->getOption('default-value'));
+ } else {
+ $output->writeln('<error>The property does not exist for user "' . $uid . '".</error>');
+ return self::FAILURE;
+ }
+
+ return self::SUCCESS;
+ }
+
+ private function deleteProfileProperty(OutputInterface $output, IAccount $userAccount, string $key): int {
+ return $this->editProfileProperty($output, $userAccount, $key, '');
+ }
+
+ private function editProfileProperty(OutputInterface $output, IAccount $userAccount, string $key, string $value): int {
+ try {
+ $userAccount->getProperty($key)->setValue($value);
+ } catch (PropertyDoesNotExistException $exception) {
+ $output->writeln('<error>' . $exception->getMessage() . '</error>');
+ return self::FAILURE;
+ }
+
+ $this->accountManager->updateAccount($userAccount);
+ return self::SUCCESS;
+ }
+
+ private function getStoredValue(IAccount $userAccount, string $key): ?string {
+ try {
+ $property = $userAccount->getProperty($key);
+ } catch (PropertyDoesNotExistException) {
+ return null;
+ }
+ return $property->getValue() === '' ? null : $property->getValue();
+ }
+
+ private function getAllProfileProperties(IAccount $userAccount): array {
+ $properties = [];
+
+ foreach ($userAccount->getAllProperties() as $property) {
+ if ($property->getValue() !== '') {
+ $properties[$property->getName()] = $property->getValue();
+ }
+ }
+
+ return $properties;
+ }
+
+ /**
+ * @param string $argumentName
+ * @param CompletionContext $context
+ * @return string[]
+ */
+ public function completeArgumentValues($argumentName, CompletionContext $context): array {
+ if ($argumentName === 'uid') {
+ return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->search($context->getCurrentWord()));
+ }
+ if ($argumentName === 'key') {
+ $userId = $context->getWordAtIndex($context->getWordIndex() - 1);
+ $user = $this->userManager->get($userId);
+ if (!($user instanceof IUser)) {
+ return [];
+ }
+
+ $account = $this->accountManager->getAccount($user);
+
+ $properties = $this->getAllProfileProperties($account);
+ return array_keys($properties);
+ }
+ return [];
+ }
+}
diff --git a/core/l10n/bg.js b/core/l10n/bg.js
index a16d0edf7cd..a61e4a52df4 100644
--- a/core/l10n/bg.js
+++ b/core/l10n/bg.js
@@ -27,8 +27,10 @@ OC.L10N.register(
"Could not complete login" : "Не може да завърши влизането",
"State token missing" : "Липсва токен/маркер/ на състоянието",
"Your login token is invalid or has expired" : "Вашият маркер за вход е невалиден или е изтекъл",
+ "Please use original client" : "Моля, използвайте оригиналния клиент.",
"This community release of Nextcloud is unsupported and push notifications are limited." : "Тази общностна версия на Nextcloud не се поддържа и push известия са ограничени.",
"Login" : "Вписване",
+ "Unsupported email length (>255)" : "Дължината на е-мейлът не се поддържа (>255 символа)",
"Password reset is disabled" : "Възстановяването на пароли е забранено",
"Could not reset password because the token is expired" : "Възстановяването на паролата е неуспешно, защото токенът е с изтекла валидност",
"Could not reset password because the token is invalid" : "Възстановяването на паролата е неуспешно, защото токенът е невалиден",
@@ -38,8 +40,13 @@ OC.L10N.register(
"Click the following button to reset your password. If you have not requested the password reset, then ignore this email." : "Кликнете върху следния бутон, за да възстановите паролата си. Ако не сте поискали възстановяване на паролата, игнорирайте този имейл.",
"Click the following link to reset your password. If you have not requested the password reset, then ignore this email." : "Кликнете върху следната връзка, за да възстановите паролата си. Ако не сте поискали възстановяване на паролата, игнорирайте този имейл.",
"Reset your password" : "Възстановяване на вашата парола",
+ "The given provider is not available" : "Доставчикът не е наличен",
+ "Task not found" : "Задачата не е открита",
"Internal error" : "Вътрешна грешка",
"Not found" : "Не е намерен",
+ "Node is locked" : "Точката е заключена (Node is locked)",
+ "Bad request" : "Лоша заявка",
+ "Requested task type does not exist" : "Заявената задача не съществува",
"Image not found" : "Изображението не е открито",
"No translation provider available" : "Няма наличен доставчик на преводи",
"Could not detect language" : "Не можа да се установи езика",
@@ -249,6 +256,7 @@ OC.L10N.register(
"Collaborative tags" : "Съвместни етикети",
"No tags found" : "Не са открити етикети",
"Personal" : "Лични",
+ "Accounts" : "Профили",
"Admin" : "Админ",
"Help" : "Помощ",
"Access forbidden" : "Достъпът е забранен",
@@ -341,9 +349,12 @@ OC.L10N.register(
"The profile does not exist." : "Профилът не съществува.",
"Your data directory and files are probably accessible from the internet because the .htaccess file does not work." : "Директория с данни и файлове ви са вероятно са достъпни от Интернет, защото файлът \".htaccess\" не функционира.",
"For information how to properly configure your server, please see the <a href=\"%s\" target=\"_blank\" rel=\"noreferrer noopener\">documentation</a>." : "Информация, как да настроите сървъра коректно, ще намерите в <a href=\"%s\" target=\"_blank\" rel=\"noreferrer noopener\">документацията</a>.",
+ "<strong>Create an admin account</strong>" : "<strong>Създай администраторски профил</strong>",
+ "New admin account name" : "Ново име на администраторския профил",
"Show password" : "Покажи парола",
"Toggle password visibility" : "Превключване на видимостта на парола",
"Configure the database" : "Конфигуриране на базата данни",
- "Only %s is available." : "Само %s е наличен."
+ "Only %s is available." : "Само %s е наличен.",
+ "Database account" : "Профил за база данни"
},
"nplurals=2; plural=(n != 1);");
diff --git a/core/l10n/bg.json b/core/l10n/bg.json
index 13f85aaf9c9..ea91cde0611 100644
--- a/core/l10n/bg.json
+++ b/core/l10n/bg.json
@@ -25,8 +25,10 @@
"Could not complete login" : "Не може да завърши влизането",
"State token missing" : "Липсва токен/маркер/ на състоянието",
"Your login token is invalid or has expired" : "Вашият маркер за вход е невалиден или е изтекъл",
+ "Please use original client" : "Моля, използвайте оригиналния клиент.",
"This community release of Nextcloud is unsupported and push notifications are limited." : "Тази общностна версия на Nextcloud не се поддържа и push известия са ограничени.",
"Login" : "Вписване",
+ "Unsupported email length (>255)" : "Дължината на е-мейлът не се поддържа (>255 символа)",
"Password reset is disabled" : "Възстановяването на пароли е забранено",
"Could not reset password because the token is expired" : "Възстановяването на паролата е неуспешно, защото токенът е с изтекла валидност",
"Could not reset password because the token is invalid" : "Възстановяването на паролата е неуспешно, защото токенът е невалиден",
@@ -36,8 +38,13 @@
"Click the following button to reset your password. If you have not requested the password reset, then ignore this email." : "Кликнете върху следния бутон, за да възстановите паролата си. Ако не сте поискали възстановяване на паролата, игнорирайте този имейл.",
"Click the following link to reset your password. If you have not requested the password reset, then ignore this email." : "Кликнете върху следната връзка, за да възстановите паролата си. Ако не сте поискали възстановяване на паролата, игнорирайте този имейл.",
"Reset your password" : "Възстановяване на вашата парола",
+ "The given provider is not available" : "Доставчикът не е наличен",
+ "Task not found" : "Задачата не е открита",
"Internal error" : "Вътрешна грешка",
"Not found" : "Не е намерен",
+ "Node is locked" : "Точката е заключена (Node is locked)",
+ "Bad request" : "Лоша заявка",
+ "Requested task type does not exist" : "Заявената задача не съществува",
"Image not found" : "Изображението не е открито",
"No translation provider available" : "Няма наличен доставчик на преводи",
"Could not detect language" : "Не можа да се установи езика",
@@ -247,6 +254,7 @@
"Collaborative tags" : "Съвместни етикети",
"No tags found" : "Не са открити етикети",
"Personal" : "Лични",
+ "Accounts" : "Профили",
"Admin" : "Админ",
"Help" : "Помощ",
"Access forbidden" : "Достъпът е забранен",
@@ -339,9 +347,12 @@
"The profile does not exist." : "Профилът не съществува.",
"Your data directory and files are probably accessible from the internet because the .htaccess file does not work." : "Директория с данни и файлове ви са вероятно са достъпни от Интернет, защото файлът \".htaccess\" не функционира.",
"For information how to properly configure your server, please see the <a href=\"%s\" target=\"_blank\" rel=\"noreferrer noopener\">documentation</a>." : "Информация, как да настроите сървъра коректно, ще намерите в <a href=\"%s\" target=\"_blank\" rel=\"noreferrer noopener\">документацията</a>.",
+ "<strong>Create an admin account</strong>" : "<strong>Създай администраторски профил</strong>",
+ "New admin account name" : "Ново име на администраторския профил",
"Show password" : "Покажи парола",
"Toggle password visibility" : "Превключване на видимостта на парола",
"Configure the database" : "Конфигуриране на базата данни",
- "Only %s is available." : "Само %s е наличен."
+ "Only %s is available." : "Само %s е наличен.",
+ "Database account" : "Профил за база данни"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/core/l10n/ga.js b/core/l10n/ga.js
index ced296f0f1d..e3e9f103da5 100644
--- a/core/l10n/ga.js
+++ b/core/l10n/ga.js
@@ -328,6 +328,11 @@ OC.L10N.register(
"Login form is disabled." : "Tá an fhoirm logáil isteach díchumasaithe.",
"The Nextcloud login form is disabled. Use another login option if available or contact your administration." : "Tá foirm logáil isteach Nextcloud díchumasaithe. Úsáid rogha logáil isteach eile má tá sé ar fáil nó déan teagmháil le do lucht riaracháin.",
"More actions" : "Tuilleadh gníomhartha",
+ "User menu" : "Roghchlár úsáideora",
+ "You will be identified as {user} by the account owner." : "Aithneoidh úinéir an chuntais thú mar {user}.",
+ "You are currently not identified." : "Níl aitheantas tugtha duit faoi láthair.",
+ "Set public name" : "Socraigh ainm poiblí",
+ "Change public name" : "Athraigh ainm poiblí",
"Password is too weak" : "Tá pasfhocal ró-lag",
"Password is weak" : "Tá pasfhocal lag",
"Password is average" : "Is pasfhocal meánach",
diff --git a/core/l10n/ga.json b/core/l10n/ga.json
index 3e559c1c579..750706690b9 100644
--- a/core/l10n/ga.json
+++ b/core/l10n/ga.json
@@ -326,6 +326,11 @@
"Login form is disabled." : "Tá an fhoirm logáil isteach díchumasaithe.",
"The Nextcloud login form is disabled. Use another login option if available or contact your administration." : "Tá foirm logáil isteach Nextcloud díchumasaithe. Úsáid rogha logáil isteach eile má tá sé ar fáil nó déan teagmháil le do lucht riaracháin.",
"More actions" : "Tuilleadh gníomhartha",
+ "User menu" : "Roghchlár úsáideora",
+ "You will be identified as {user} by the account owner." : "Aithneoidh úinéir an chuntais thú mar {user}.",
+ "You are currently not identified." : "Níl aitheantas tugtha duit faoi láthair.",
+ "Set public name" : "Socraigh ainm poiblí",
+ "Change public name" : "Athraigh ainm poiblí",
"Password is too weak" : "Tá pasfhocal ró-lag",
"Password is weak" : "Tá pasfhocal lag",
"Password is average" : "Is pasfhocal meánach",
diff --git a/core/l10n/nl.js b/core/l10n/nl.js
index b5de7558cdc..04a11c30493 100644
--- a/core/l10n/nl.js
+++ b/core/l10n/nl.js
@@ -27,6 +27,7 @@ OC.L10N.register(
"Could not complete login" : "De login kon niet worden voltooid",
"State token missing" : "Toestandstoken bestaat niet",
"Your login token is invalid or has expired" : "Je inlogtoken is ongeldig of is vervallen",
+ "Please use original client" : "Gebruik alsjeblieft de originele client",
"This community release of Nextcloud is unsupported and push notifications are limited." : "Deze community release van Nextcloud wordt niet ondersteund en meldingen zijn beperkt",
"Login" : "Inloggen",
"Unsupported email length (>255)" : "Niet ondersteunde e-maillengte (>255)",
diff --git a/core/l10n/nl.json b/core/l10n/nl.json
index d096601a4cb..cf651e8ed18 100644
--- a/core/l10n/nl.json
+++ b/core/l10n/nl.json
@@ -25,6 +25,7 @@
"Could not complete login" : "De login kon niet worden voltooid",
"State token missing" : "Toestandstoken bestaat niet",
"Your login token is invalid or has expired" : "Je inlogtoken is ongeldig of is vervallen",
+ "Please use original client" : "Gebruik alsjeblieft de originele client",
"This community release of Nextcloud is unsupported and push notifications are limited." : "Deze community release van Nextcloud wordt niet ondersteund en meldingen zijn beperkt",
"Login" : "Inloggen",
"Unsupported email length (>255)" : "Niet ondersteunde e-maillengte (>255)",
diff --git a/core/l10n/ru.js b/core/l10n/ru.js
index 9a8542a6abe..3b3a18387d5 100644
--- a/core/l10n/ru.js
+++ b/core/l10n/ru.js
@@ -328,6 +328,11 @@ OC.L10N.register(
"Login form is disabled." : "Форма входа отключена.",
"The Nextcloud login form is disabled. Use another login option if available or contact your administration." : "Диалог входа отключен. Используйте другой способ входа или свяжитесь с администратором.",
"More actions" : "Больше действий",
+ "User menu" : "Меню пользователя",
+ "You will be identified as {user} by the account owner." : "Владелец учётной записи будет видеть вас как {user}.",
+ "You are currently not identified." : "В данный момент вы не идентифицированы.",
+ "Set public name" : "Задать публичное имя",
+ "Change public name" : "Изменить публичное имя",
"Password is too weak" : "Пароль слишком слабый",
"Password is weak" : "Пароль слабый",
"Password is average" : "Пароль средний",
diff --git a/core/l10n/ru.json b/core/l10n/ru.json
index 9e765e2dc41..f4f2442d2e4 100644
--- a/core/l10n/ru.json
+++ b/core/l10n/ru.json
@@ -326,6 +326,11 @@
"Login form is disabled." : "Форма входа отключена.",
"The Nextcloud login form is disabled. Use another login option if available or contact your administration." : "Диалог входа отключен. Используйте другой способ входа или свяжитесь с администратором.",
"More actions" : "Больше действий",
+ "User menu" : "Меню пользователя",
+ "You will be identified as {user} by the account owner." : "Владелец учётной записи будет видеть вас как {user}.",
+ "You are currently not identified." : "В данный момент вы не идентифицированы.",
+ "Set public name" : "Задать публичное имя",
+ "Change public name" : "Изменить публичное имя",
"Password is too weak" : "Пароль слишком слабый",
"Password is weak" : "Пароль слабый",
"Password is average" : "Пароль средний",
diff --git a/core/l10n/sr.js b/core/l10n/sr.js
index d83a10bccc0..45619021ed6 100644
--- a/core/l10n/sr.js
+++ b/core/l10n/sr.js
@@ -328,6 +328,11 @@ OC.L10N.register(
"Login form is disabled." : "Форма за пријаву је искључена.",
"The Nextcloud login form is disabled. Use another login option if available or contact your administration." : "Nextcloud формулар за пријаву је искључен. Ако је доступна, користите неку другу могућност пријаве, или се обратите администрацији.",
"More actions" : "Још акција",
+ "User menu" : "Кориснички мени",
+ "You will be identified as {user} by the account owner." : "Власник налога ће вас идентификовати као {user}.",
+ "You are currently not identified." : "Тренутно нисте идентификовани.",
+ "Set public name" : "Постави јавно име",
+ "Change public name" : "Измени јавно име",
"Password is too weak" : "Лозинка је сувише слаба",
"Password is weak" : "Лозинка је слаба",
"Password is average" : "Лозинка је просечна",
@@ -421,6 +426,7 @@ OC.L10N.register(
"Admin" : "Администрација",
"Help" : "Помоћ",
"Access forbidden" : "Забрањен приступ",
+ "You are not allowed to access this page." : "Није вам дозвољено да приступите овој страници.",
"Back to %s" : "Назад на %s",
"Page not found" : "Страна није нађена",
"The page could not be found on the server or you may not be allowed to view it." : "Страница не може да се пронађе на серверу или можда немате права да је видите.",
diff --git a/core/l10n/sr.json b/core/l10n/sr.json
index 0c9726880d2..4ef6f99262f 100644
--- a/core/l10n/sr.json
+++ b/core/l10n/sr.json
@@ -326,6 +326,11 @@
"Login form is disabled." : "Форма за пријаву је искључена.",
"The Nextcloud login form is disabled. Use another login option if available or contact your administration." : "Nextcloud формулар за пријаву је искључен. Ако је доступна, користите неку другу могућност пријаве, или се обратите администрацији.",
"More actions" : "Још акција",
+ "User menu" : "Кориснички мени",
+ "You will be identified as {user} by the account owner." : "Власник налога ће вас идентификовати као {user}.",
+ "You are currently not identified." : "Тренутно нисте идентификовани.",
+ "Set public name" : "Постави јавно име",
+ "Change public name" : "Измени јавно име",
"Password is too weak" : "Лозинка је сувише слаба",
"Password is weak" : "Лозинка је слаба",
"Password is average" : "Лозинка је просечна",
@@ -419,6 +424,7 @@
"Admin" : "Администрација",
"Help" : "Помоћ",
"Access forbidden" : "Забрањен приступ",
+ "You are not allowed to access this page." : "Није вам дозвољено да приступите овој страници.",
"Back to %s" : "Назад на %s",
"Page not found" : "Страна није нађена",
"The page could not be found on the server or you may not be allowed to view it." : "Страница не може да се пронађе на серверу или можда немате права да је видите.",
diff --git a/core/register_command.php b/core/register_command.php
index 72a4b70f059..488317d2f5d 100644
--- a/core/register_command.php
+++ b/core/register_command.php
@@ -92,6 +92,7 @@ use OC\Core\Command\User\ClearGeneratedAvatarCacheCommand;
use OC\Core\Command\User\Info;
use OC\Core\Command\User\Keys\Verify;
use OC\Core\Command\User\LastSeen;
+use OC\Core\Command\User\Profile;
use OC\Core\Command\User\Report;
use OC\Core\Command\User\ResetPassword;
use OC\Core\Command\User\Setting;
@@ -206,6 +207,7 @@ if ($config->getSystemValueBool('installed', false)) {
$application->add(Server::get(Report::class));
$application->add(Server::get(ResetPassword::class));
$application->add(Server::get(Setting::class));
+ $application->add(Server::get(Profile::class));
$application->add(Server::get(Command\User\ListCommand::class));
$application->add(Server::get(ClearGeneratedAvatarCacheCommand::class));
$application->add(Server::get(Info::class));
diff --git a/core/src/OC/eventsource.js b/core/src/OC/eventsource.js
index bfda0a73ad0..090c351c057 100644
--- a/core/src/OC/eventsource.js
+++ b/core/src/OC/eventsource.js
@@ -7,7 +7,7 @@
/* eslint-disable */
import $ from 'jquery'
-import { getToken } from './requesttoken.ts'
+import { getRequestToken } from './requesttoken.ts'
/**
* Create a new event source
@@ -28,7 +28,7 @@ const OCEventSource = function(src, data) {
dataStr += name + '=' + encodeURIComponent(data[name]) + '&'
}
}
- dataStr += 'requesttoken=' + encodeURIComponent(getToken())
+ dataStr += 'requesttoken=' + encodeURIComponent(getRequestToken())
if (!this.useFallBack && typeof EventSource !== 'undefined') {
joinChar = '&'
if (src.indexOf('?') === -1) {