Don't throw exception when user not found
It might be a public link share.
This commit is contained in:
parent
c6a3e02b4b
commit
3f4aa7b23e
@ -180,10 +180,9 @@ class WopiController extends Controller {
|
||||
|
||||
// Set the user to register the change under his name
|
||||
$editor = \OC::$server->getUserManager()->get($res['editor']);
|
||||
if (is_null($editor)) {
|
||||
throw new \OC\User\NoUserException("User " . $res['editor'] . "not found.");
|
||||
}
|
||||
\OC::$server->getUserSession()->setUser($editor);
|
||||
if (!is_null($editor)) {
|
||||
\OC::$server->getUserSession()->setUser($editor);
|
||||
}
|
||||
|
||||
$file->putContent($content);
|
||||
return new JSONResponse();
|
||||
|
Loading…
x
Reference in New Issue
Block a user