mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
commit
422fd4f88c
@ -57,24 +57,17 @@ class Kernel extends ConsoleKernel
|
||||
$schedule->job(new BillingSubscriptionCron)->daily()->withoutOverlapping();
|
||||
|
||||
$schedule->job(new RecurringInvoicesCron)->hourly()->withoutOverlapping();
|
||||
|
||||
$schedule->job(new SchedulerCheck)->everyFiveMinutes();
|
||||
|
||||
/* Run hosted specific jobs */
|
||||
if (Ninja::isHosted()) {
|
||||
|
||||
$schedule->job(new AdjustEmailQuota())->daily()->withoutOverlapping();
|
||||
$schedule->job(new SendFailedEmails())->daily()->withoutOverlapping();
|
||||
$schedule->job(new AdjustEmailQuota)->daily()->withoutOverlapping();
|
||||
$schedule->job(new SendFailedEmails)->daily()->withoutOverlapping();
|
||||
|
||||
}
|
||||
/* Run queue's with this*/
|
||||
if (Ninja::isSelfHost()) {
|
||||
|
||||
$schedule->command('queue:work --daemon')->everyMinute()->withoutOverlapping();
|
||||
|
||||
//we need to add this as we are seeing cached queues mess up the system on first load.
|
||||
$schedule->command('queue:restart')->everyFiveMinutes()->withoutOverlapping();
|
||||
$schedule->job(new SchedulerCheck)->everyFiveMinutes()->withoutOverlapping();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,7 +35,7 @@ class CompanyFactory
|
||||
$company->custom_fields = (object) [];
|
||||
$company->subdomain = '';
|
||||
$company->enabled_modules = config('ninja.enabled_modules'); //32767;//8191; //4095
|
||||
$company->default_password_timeout = 30;
|
||||
$company->default_password_timeout = 30 * 60000;
|
||||
|
||||
return $company;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ class PasswordProtection
|
||||
if($timeout == 0)
|
||||
$timeout = null;
|
||||
else
|
||||
$timeout = now()->addMinutes($timeout);
|
||||
$timeout = now()->addMinutes($timeout/60000);
|
||||
|
||||
if (Cache::get(auth()->user()->hashed_id.'_logged_in')) {
|
||||
|
||||
@ -67,7 +67,7 @@ class PasswordProtection
|
||||
];
|
||||
|
||||
//If OAuth and user also has a password set - check both
|
||||
if ($existing_user = MultiDB::hasUser($query) && auth()->user()->has_password && Hash::check(auth()->user()->password, $request->header('X-API-PASSWORD'))) {
|
||||
if ($existing_user = MultiDB::hasUser($query) && auth()->user()->has_password && Hash::check(auth()->user()->password, $request->header('X-API-PASSWORD'))) {
|
||||
|
||||
Cache::add(auth()->user()->hashed_id.'_logged_in', Str::random(64), $timeout);
|
||||
return $next($request);
|
||||
|
@ -78,9 +78,15 @@ class SystemHealth
|
||||
'phantom_enabled' => (bool)config('ninja.phantomjs_pdf_generation'),
|
||||
'exec' => (bool)self::checkExecWorks(),
|
||||
'open_basedir' => (bool)self::checkOpenBaseDir(),
|
||||
'mail_mailer' => (string)self::checkMailMailer(),
|
||||
];
|
||||
}
|
||||
|
||||
public static function checkMailMailer()
|
||||
{
|
||||
return config('mail.default');
|
||||
}
|
||||
|
||||
public static function checkOpenBaseDir()
|
||||
{
|
||||
if (strlen(ini_get('open_basedir') == 0)) {
|
||||
|
Loading…
Reference in New Issue
Block a user