Skip to content

A free open source IT asset/license management system

Move ldap import ini settings to config (#7679)

Colin McNeildb59106c3eca
diff --git a/.env.example b/.env.example
index e42fa2cf7c..1ec667b289 100644
--- a/.env.example
+++ b/.env.example
@@ -116,3 +116,5 @@ FILESYSTEM_DISK=local
APP_CIPHER=AES-256-CBC
GOOGLE_MAPS_API=
BACKUP_ENV=true
+LDAP_MEM_LIM=500M
+LDAP_TIME_LIM=600
diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php
index d3bc155266..a7941050f8 100755
--- a/app/Console/Commands/LdapSync.php
+++ b/app/Console/Commands/LdapSync.php
@@ -42,9 +42,8 @@ class LdapSync extends Command
*/
public function handle()
{
- ini_set('max_execution_time', 600); //600 seconds = 10 minutes
- ini_set('memory_limit', '500M');
-
+ ini_set('max_execution_time', env('LDAP_TIME_LIM', 600)); //600 seconds = 10 minutes
+ ini_set('memory_limit', env('LDAP_MEM_LIM', '500M'));
$ldap_result_username = Setting::getSettings()->ldap_username_field;
$ldap_result_last_name = Setting::getSettings()->ldap_lname_field;
$ldap_result_first_name = Setting::getSettings()->ldap_fname_field;