mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Merge branch 'v5-develop' of https://github.com/turbo124/invoiceninja into v5-develop
This commit is contained in:
commit
6565be9afd
@ -85,6 +85,11 @@ class CreateAccount
|
||||
$sp794f3f->hosted_client_count = config('ninja.quotas.free.clients');
|
||||
$sp794f3f->hosted_company_count = config('ninja.quotas.free.max_companies');
|
||||
$sp794f3f->account_sms_verified = true;
|
||||
|
||||
if(in_array($this->getDomain($this->request['email']), ['gmail.com', 'hotmail.com', 'outlook.com', 'yahoo.com'])){
|
||||
$sp794f3f->account_sms_verified = false;
|
||||
}
|
||||
|
||||
// $sp794f3f->trial_started = now();
|
||||
// $sp794f3f->trial_plan = 'pro';
|
||||
}
|
||||
@ -155,4 +160,19 @@ class CreateAccount
|
||||
|
||||
return $sp794f3f;
|
||||
}
|
||||
|
||||
private function getDomain($email)
|
||||
{
|
||||
if( filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
|
||||
// split on @ and return last value of array (the domain)
|
||||
$domain = explode('@', $email);
|
||||
|
||||
$domain_name = end($domain);
|
||||
|
||||
return $domain_name;
|
||||
}
|
||||
|
||||
return 'gmail.com';
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -95,12 +95,6 @@ return [
|
||||
'strict' => env('DB_STRICT', false),
|
||||
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
|
||||
'options' => [],
|
||||
// 'options' => [
|
||||
// PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => false,
|
||||
// PDO::MYSQL_ATTR_SSL_KEY => env("DB_CLIENT_KEY", ''),
|
||||
// PDO::MYSQL_ATTR_SSL_CERT => env("DB_CLIENT_CERT", ''),
|
||||
// PDO::MYSQL_ATTR_SSL_CA => env("DB_CA_CERT", ''),
|
||||
// ],
|
||||
],
|
||||
|
||||
'db-ninja-01a' => [
|
||||
|
Loading…
Reference in New Issue
Block a user