Skip to content
Snippets Groups Projects
Unverified Commit 088cd08f authored by Christoph Wurst's avatar Christoph Wurst
Browse files

Make sure an account exists before updating it

parent 5caa3cea
No related branches found
No related tags found
No related merge requests found
......@@ -194,6 +194,13 @@ class AccountsController extends Controller {
string $smtpSslMode = null,
string $smtpUser = null,
string $smtpPassword = null): JSONResponse {
try {
// Make sure the account actually exists
$this->accountService->find($this->currentUserId, $id);
} catch (ClientException $e) {
return new JSONResponse([], Http::STATUS_BAD_REQUEST);
}
$account = null;
$errorMessage = null;
try {
......
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