mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Don't try to purge objects from the birthday calendar when it doesn't exist
Doesn't matter much as it's been recreated afterwards with (ensureCalendarExists). Closes #29617 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
0a956e2b95
commit
554e2dce48
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