From: Hypolite Petovan Date: Sun, 5 Jan 2020 22:09:05 +0000 (-0500) Subject: Use default user permissions when creating new event X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=465d7e6751ad42a25d4f3ed6ac0da1bc548dca3b;p=friendica.git Use default user permissions when creating new event --- diff --git a/mod/events.php b/mod/events.php index d6701ce448..d1d3d758b4 100644 --- a/mod/events.php +++ b/mod/events.php @@ -18,6 +18,7 @@ use Friendica\DI; use Friendica\Model\Event; use Friendica\Model\Item; use Friendica\Model\Profile; +use Friendica\Model\User; use Friendica\Module\Security\Login; use Friendica\Util\DateTimeFormat; use Friendica\Util\Strings; @@ -427,7 +428,7 @@ function events_content(App $a) // Passed parameters overrides anything found in the DB if (in_array($mode, ['edit', 'new', 'copy'])) { if (empty($orig_event)) { - $orig_event = []; + $orig_event = User::getById(local_user(), ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid']);; } // In case of an error the browser is redirected back here, with these parameters filled in with the previous values