1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Fixes for cleanly deleting and restoring users

This commit is contained in:
David Bomba 2020-09-29 08:08:44 +10:00
parent 3e86da3712
commit e310118bf4
2 changed files with 5 additions and 1 deletions

View File

@ -48,7 +48,7 @@ class DeletedUserActivity implements ShouldQueue
$fields = new \stdClass;
if (auth()->user()->id) {
if (auth()->check()) {
$fields->user_id = auth()->user()->id;
} else {
$fields->user_id = $event->user->id;

View File

@ -53,8 +53,12 @@ trait HasRecurrence
*/
public function setDayOfMonth($date, $day_of_month)
{
info($date);
$carbon_date = Carbon::parse($date);
info($carbon_date);
$set_date = $carbon_date->copy()->setUnitNoOverflow('day', $day_of_month, 'month');
//If the set date is less than the original date we need to add a month.