mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
commit
d9c6ce1f4c
@ -329,7 +329,7 @@ class CreateTestData extends Command
|
|||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->count = $this->count * 100;
|
$this->count = $this->count * 10;
|
||||||
|
|
||||||
$this->info('Creating '.$this->count.' clients');
|
$this->info('Creating '.$this->count.' clients');
|
||||||
|
|
||||||
|
@ -47,7 +47,8 @@ class RecurringInvoiceToInvoiceFactory
|
|||||||
$invoice->user_id = $recurring_invoice->user_id;
|
$invoice->user_id = $recurring_invoice->user_id;
|
||||||
$invoice->company_id = $recurring_invoice->company_id;
|
$invoice->company_id = $recurring_invoice->company_id;
|
||||||
$invoice->recurring_id = $recurring_invoice->id;
|
$invoice->recurring_id = $recurring_invoice->id;
|
||||||
|
$invoice->client_id = $client->id;
|
||||||
|
|
||||||
return $invoice;
|
return $invoice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ use App\DataMapper\CompanySettings;
|
|||||||
use App\DataMapper\DefaultSettings;
|
use App\DataMapper\DefaultSettings;
|
||||||
use App\Events\User\UserEmailAddressChangedNewEmail;
|
use App\Events\User\UserEmailAddressChangedNewEmail;
|
||||||
use App\Events\User\UserEmailAddressChangedOldEmail;
|
use App\Events\User\UserEmailAddressChangedOldEmail;
|
||||||
|
use App\Events\User\UserWasCreated;
|
||||||
use App\Factory\UserFactory;
|
use App\Factory\UserFactory;
|
||||||
use App\Filters\UserFilters;
|
use App\Filters\UserFilters;
|
||||||
use App\Http\Controllers\Traits\VerifiesUserEmail;
|
use App\Http\Controllers\Traits\VerifiesUserEmail;
|
||||||
@ -204,6 +205,8 @@ class UserController extends BaseController
|
|||||||
|
|
||||||
$ct = CreateCompanyToken::dispatchNow($company, $user, $user_agent);
|
$ct = CreateCompanyToken::dispatchNow($company, $user, $user_agent);
|
||||||
|
|
||||||
|
event(new UserWasCreated($user, $company, Ninja::eventVars()));
|
||||||
|
|
||||||
return $this->itemResponse($user->fresh());
|
return $this->itemResponse($user->fresh());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,11 @@ class SendVerificationNotification implements ShouldQueue
|
|||||||
$event->user->notify(new VerifyUser($event->user));
|
$event->user->notify(new VerifyUser($event->user));
|
||||||
|
|
||||||
Ninja::registerNinjaUser($event->user);
|
Ninja::registerNinjaUser($event->user);
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
|
info("I couldn't send the email " . $e->getMessage());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ use App\Factory\CompanyUserFactory;
|
|||||||
use App\Models\CompanyUser;
|
use App\Models\CompanyUser;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Utils\Ninja;
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -24,6 +25,8 @@ use Illuminate\Http\Request;
|
|||||||
*/
|
*/
|
||||||
class UserRepository extends BaseRepository
|
class UserRepository extends BaseRepository
|
||||||
{
|
{
|
||||||
|
use MakesHash;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the class name.
|
* Gets the class name.
|
||||||
*
|
*
|
||||||
@ -66,6 +69,10 @@ class UserRepository extends BaseRepository
|
|||||||
}
|
}
|
||||||
|
|
||||||
$user->fill($details);
|
$user->fill($details);
|
||||||
|
|
||||||
|
if(!$user->confirmation_code)
|
||||||
|
$user->confirmation_code = $this->createDbHash(config('database.default'));
|
||||||
|
|
||||||
$user->account_id = $account->id;
|
$user->account_id = $account->id;
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ class RecurringInvoiceTransformer extends EntityTransformer
|
|||||||
'assigned_user_id' => $this->encodePrimaryKey($invoice->assigned_user_id),
|
'assigned_user_id' => $this->encodePrimaryKey($invoice->assigned_user_id),
|
||||||
'amount' => (float) $invoice->amount,
|
'amount' => (float) $invoice->amount,
|
||||||
'balance' => (float) $invoice->balance,
|
'balance' => (float) $invoice->balance,
|
||||||
'client_id' => (string) $invoice->client_id,
|
'client_id' => (string) $this->encodePrimaryKey($invoice->client_id),
|
||||||
'vendor_id' => (string) $this->encodePrimaryKey($invoice->vendor_id),
|
'vendor_id' => (string) $this->encodePrimaryKey($invoice->vendor_id),
|
||||||
'status_id' => (string) ($invoice->status_id ?: 1),
|
'status_id' => (string) ($invoice->status_id ?: 1),
|
||||||
'design_id' => (string) $this->encodePrimaryKey($invoice->design_id),
|
'design_id' => (string) $this->encodePrimaryKey($invoice->design_id),
|
||||||
@ -136,6 +136,7 @@ class RecurringInvoiceTransformer extends EntityTransformer
|
|||||||
'remaining_cycles' => (int) $invoice->remaining_cycles,
|
'remaining_cycles' => (int) $invoice->remaining_cycles,
|
||||||
'recurring_dates' => (array) $invoice->recurringDates(),
|
'recurring_dates' => (array) $invoice->recurringDates(),
|
||||||
'auto_bill' => (string) $invoice->auto_bill,
|
'auto_bill' => (string) $invoice->auto_bill,
|
||||||
|
'due_date_days' => (string) $invoice->due_date_days ?: '',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user