1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for blank company name

This commit is contained in:
David Bomba 2021-03-08 15:20:02 +11:00
parent d83073ad91
commit 9c2e5c2de4
3 changed files with 8 additions and 3 deletions

View File

@ -65,6 +65,10 @@ class CreateUser
$user->email = $this->request['email']; //todo need to remove this in production
$user->last_login = now();
$user->ip = request()->ip();
if(Ninja::isSelfHost())
$user->email_verified_at = now();
$user->save();
$user->companies()->attach($this->company->id, [
@ -78,7 +82,8 @@ class CreateUser
'settings' => null,
]);
event(new UserWasCreated($user, $user, $this->company, Ninja::eventVars()));
if(!Ninja::isSelfHost())
event(new UserWasCreated($user, $user, $this->company, Ninja::eventVars()));
return $user;
}

View File

@ -45,7 +45,7 @@ class MailSentListener implements ShouldQueue
$postmark_id = $event->message->getHeaders()->get('x-pm-message-id')->getValue();
nlog($postmark_id);
// nlog($postmark_id);
$invitation = $event->message->invitation;
$invitation->message_id = $postmark_id;
$invitation->save();

View File

@ -271,7 +271,7 @@ class HtmlEngine
$data['$company.city_state_postal'] = ['value' => $this->company->present()->cityStateZip($this->settings->city, $this->settings->state, $this->settings->postal_code, false) ?: ' ', 'label' => ctrans('texts.city_state_postal')];
$data['$company.postal_city_state'] = ['value' => $this->company->present()->cityStateZip($this->settings->city, $this->settings->state, $this->settings->postal_code, true) ?: ' ', 'label' => ctrans('texts.postal_city_state')];
$data['$company.name'] = ['value' => $this->settings->name ?: ' ', 'label' => ctrans('texts.company_name')];
$data['$company.name'] = ['value' => $this->settings->name ?: ctrans('texts.untitled_account'), 'label' => ctrans('texts.company_name')];
$data['$company.address1'] = ['value' => $this->settings->address1 ?: ' ', 'label' => ctrans('texts.address1')];
$data['$company.address2'] = ['value' => $this->settings->address2 ?: ' ', 'label' => ctrans('texts.address2')];
$data['$company.city'] = ['value' => $this->settings->city ?: ' ', 'label' => ctrans('texts.city')];