Merge pull request #5012 from turbo124/v5-stable

v5.1.13
This commit is contained in:
David Bomba 2021-03-02 07:16:28 +11:00 committed by GitHub
commit 015d99a3ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 7 deletions

View File

@ -1 +1 @@
5.1.12 5.1.13

View File

@ -39,9 +39,9 @@ class StoreUserRequest extends Request
$rules['last_name'] = 'required|string|max:100'; $rules['last_name'] = 'required|string|max:100';
if (config('ninja.db.multi_db_enabled')) { if (config('ninja.db.multi_db_enabled')) {
$rules['email'] = ['email', new ValidUserForCompany(), Rule::unique('users')->ignore($this->input('company_user.account.id'), 'account_id')]; $rules['email'] = ['email', new ValidUserForCompany(), Rule::unique('users')->ignore(auth()->user()->company()->account_id, 'account_id')];
} else { } else {
$rules['email'] = ['email',Rule::unique('users')->ignore($this->input('company_user.account.id'), 'account_id')]; $rules['email'] = ['email',Rule::unique('users')->ignore(auth()->user()->company()->account_id, 'account_id')];
} }
@ -56,7 +56,10 @@ class StoreUserRequest extends Request
{ {
$input = $this->all(); $input = $this->all();
nlog($this->input('company_user.account')); //unique user rule - check company_user table for user_id / company_id / account_id if none exist we can add the user. ELSE return false
//nlog($this->all());
//nlog($this->input('company_user.account'));
// nlog($this->input('company_user.account.id')); // nlog($this->input('company_user.account.id'));
// nlog($this->input('company_user.account.id')); // nlog($this->input('company_user.account.id'));

View File

@ -36,8 +36,10 @@ class CompanyPresenter extends EntityPresenter
$settings = $this->entity->settings; $settings = $this->entity->settings;
} }
if(strlen($settings->company_logo)) if(strlen($settings->company_logo) >= 1 && strpos($settings->company_logo, 'http'))
return asset($settings->company_logo); return $settings->company_logo;
else if(strlen($settings->company_logo) >= 1)
return url('') . $settings->company_logo;
else else
return 'https://www.invoiceninja.com/wp-content/uploads/2019/01/InvoiceNinja-Logo-Round-300x300.png'; return 'https://www.invoiceninja.com/wp-content/uploads/2019/01/InvoiceNinja-Logo-Round-300x300.png';

View File

@ -13,7 +13,7 @@ return [
'require_https' => env('REQUIRE_HTTPS', true), 'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', ''), 'app_domain' => env('APP_DOMAIN', ''),
'app_version' => '5.1.12', 'app_version' => '5.1.13',
'minimum_client_version' => '5.0.16', 'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1', 'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false), 'api_secret' => env('API_SECRET', false),