summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--settings/Controller/UsersController.php6
-rw-r--r--settings/js/users/users.js2
2 files changed, 6 insertions, 2 deletions
diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php
index f5b7f2d2e5d..5f74eaa82fb 100644
--- a/settings/Controller/UsersController.php
+++ b/settings/Controller/UsersController.php
@@ -355,9 +355,13 @@ class UsersController extends Controller {
try {
$user = $this->userManager->createUser($username, $password);
} catch (\Exception $exception) {
+ $message = $exception->getMessage();
+ if (!$message) {
+ $message = $this->l10n->t('Unable to create user.');
+ }
return new DataResponse(
array(
- 'message' => (string)$this->l10n->t('Unable to create user.')
+ 'message' => (string) $message,
),
Http::STATUS_FORBIDDEN
);
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 9706ac9fbcd..03f471bc3b4 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -840,7 +840,7 @@ $(document).ready(function () {
}).fail(function(result) {
OC.Notification.showTemporary(t('settings', 'Error creating user: {message}', {
message: result.responseJSON.message
- }));
+ }, undefined, {escape: false}));
}).success(function(){
$('#newuser').get(0).reset();
});