From 1fcb3af4c036e1d29ebfc0a8a628d9402f65af82 Mon Sep 17 00:00:00 2001 From: acognet Date: Fri, 14 Oct 2022 17:09:35 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B05618=20-=20Setup=20:=20Compatibility=20P?= =?UTF-8?q?HP=208.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config.class.inc.php | 2 +- core/userrights.class.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/config.class.inc.php b/core/config.class.inc.php index eeef51320..d15634b77 100644 --- a/core/config.class.inc.php +++ b/core/config.class.inc.php @@ -2270,7 +2270,7 @@ class Config $oHandle = null; $sConfig = null; - if (is_file($this->m_sFile)) + if ($this->m_sFile!= null && is_file($this->m_sFile)) { $oHandle = fopen($this->m_sFile, 'r'); $index = 0; diff --git a/core/userrights.class.inc.php b/core/userrights.class.inc.php index 071c2ffb1..8b44c6430 100644 --- a/core/userrights.class.inc.php +++ b/core/userrights.class.inc.php @@ -348,7 +348,7 @@ abstract class User extends cmdbAbstractObject $aChanges = $this->ListChanges(); if (array_key_exists('login', $aChanges)) { // Check login uniqueness - if (strcasecmp($this->Get('login'), $this->GetOriginal('login')) !== 0) { + if ( $this->GetOriginal('login')== null || strcasecmp($this->Get('login'), $this->GetOriginal('login')) !== 0) { $sNewLogin = $aChanges['login']; $oSearch = DBObjectSearch::FromOQL_AllData("SELECT User WHERE login = :newlogin"); if (!$this->IsNew()) {