Skip to content
Snippets Groups Projects
Verified Commit 710d4185 authored by Damien's avatar Damien
Browse files

FIX from merge request

parent 5788a193
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="utf-8"?>
<ROOT>
<config>
<sessionTime>1440</sessionTime> <!-- minutes -->
<sessionTime>10080</sessionTime> <!-- minutes -->
<timezone>Europe/Paris</timezone>
<customLangPathDirectory></customLangPathDirectory>
</config>
......
......@@ -2,12 +2,13 @@
<phpunit colors="true" bootstrap="test/unitTests/define.php">
<testsuites>
<testsuite name="Maarch Parapheur Test Suite">
<!-- <file>test/unitTests/core/AuthenticationControllerTest.php</file> -->
<file>test/unitTests/core/AuthenticationControllerTest.php</file>
<file>test/unitTests/core/PasswordControllerTest.php</file>
<file>test/unitTests/app/user/UserControllerTest.php</file>
<file>test/unitTests/app/configuration/ConfigurationControllerTest.php</file>
<file>test/unitTests/app/document/DocumentControllerTest.php</file>
<file>test/unitTests/app/group/GroupControllerTest.php</file>
<file>test/unitTests/app/history/HistoryControllerTest.php</file>
</testsuite>
</testsuites>
<filter>
......
......@@ -188,7 +188,7 @@ class ConfigurationController
return $response->withStatus(400)->withJson(['errors' => $check['errors']]);
}
if ($body['value']['auth'] && empty($body['value']['password']) && !empty($configuration)) {
if ($body['value']['auth'] && empty($body['value']['password'])) {
$configuration['value'] = json_decode($configuration['value'], true);
if (!empty($configuration['value']['password'])) {
$body['value']['password'] = $configuration['value']['password'];
......
......@@ -322,6 +322,11 @@ class UserController
return $response->withStatus(400)->withJson(['errors' => 'Body notifications is empty or not a boolean']);
}
$user = UserModel::getById(['id' => $args['id'], 'select' => ['firstname', 'lastname']]);
if (empty($user)) {
return $response->withStatus(400)->withJson(['errors' => 'User does not exist']);
}
$preferences = json_encode([
'lang' => $body['lang'],
'writingMode' => $body['writingMode'],
......@@ -344,7 +349,7 @@ class UserController
'objectType' => 'users',
'objectId' => $args['id'],
'type' => 'MODIFICATION',
'message' => "{userUpdated} : {$body['firstname']} {$body['lastname']}"
'message' => "{userUpdated} : {$user['firstname']} {$user['lastname']}"
]);
return $response->withStatus(204);
......
......@@ -172,14 +172,6 @@ export class SendmailComponent implements OnInit {
error: true
};
}
},
error: err => {
this.emailSendResult = {
icon: 'fa-times red',
msg: 'lang.emailSendFailed',
debug: err.error.errors,
error: true
};
}
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment