diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 7379877753b..19cb66ad68d 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -459,7 +459,7 @@ class Translate // Enable caching of lang file in memory (not by default) $usecachekey = ''; // Using a memcached server - if (!empty($conf->memcached->enabled) && !empty($conf->global->MEMCACHED_SERVER)) { + if (isModEnabled('memcached') && !empty($conf->global->MEMCACHED_SERVER)) { $usecachekey = $newdomain.'_'.$langofdir; // Should not contains special chars } elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { // Using cache with shmop. Speed gain: 40ms - Memory overusage: 200ko (Size of session cache file) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index e7b9bdbf844..8767c70f2b1 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -12,7 +12,7 @@ * Copyright (C) 2015 Marcos García * Copyright (C) 2018 charlene Benke * Copyright (C) 2018-2021 Nicolas ZABOURI - * Copyright (C) 2019-2020 Frédéric France + * Copyright (C) 2019-2023 Frédéric France * Copyright (C) 2019 Abbes Bahfir * * This program is free software; you can redistribute it and/or modify @@ -2453,7 +2453,7 @@ class User extends CommonObject //print $password.'-'.$this->id.'-'.$dolibarr_main_instance_unique_id; $url = $urlwithroot.'/user/passwordforgotten.php?action=validatenewpassword'; $url .= '&username='.urlencode($this->login)."&passworduidhash=".urlencode(dol_hash($password.'-'.$this->id.'-'.$dolibarr_main_instance_unique_id)); - if (!empty($conf->multicompany->enabled)) { + if (isModEnabled('multicompany')) { $url .= '&entity='.(!empty($this->entity) ? $this->entity : 1); }