mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Merge pull request #33341 from nextcloud/fix/29617/no-purge-when-birthday-calendar-doesnt-exist
Don't try to purge objects from the birthday calendar when it doesn't exist
This commit is contained in:
commit
25d2099fce
1 changed files with 3 additions and 0 deletions
|
|
@ -273,6 +273,9 @@ class BirthdayService {
|
|||
public function resetForUser(string $user):void {
|
||||
$principal = 'principals/users/'.$user;
|
||||
$calendar = $this->calDavBackEnd->getCalendarByUri($principal, self::BIRTHDAY_CALENDAR_URI);
|
||||
if (!$calendar) {
|
||||
return; // The user's birthday calendar doesn't exist, no need to purge it
|
||||
}
|
||||
$calendarObjects = $this->calDavBackEnd->getCalendarObjects($calendar['id'], CalDavBackend::CALENDAR_TYPE_CALENDAR);
|
||||
|
||||
foreach ($calendarObjects as $calendarObject) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue