From e7f0631a1b1f6b70c44c62930a6d1edb2fa28d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be> Date: Thu, 26 Jul 2018 11:55:20 +0200 Subject: [PATCH] :ambulance: fix(core) improved userNoAuth to avoid crashes issue #5854 --- include/class_userinfoNoAuth.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/class_userinfoNoAuth.inc b/include/class_userinfoNoAuth.inc index 4a67ecf67..8a5a69224 100644 --- a/include/class_userinfoNoAuth.inc +++ b/include/class_userinfoNoAuth.inc @@ -31,16 +31,16 @@ class userinfoNoAuth extends userinfo { function __construct($context = 'fake') { - $this->cn = $context; - $this->dn = $context; - $this->uid = $context; - $this->ip = $_SERVER['REMOTE_ADDR']; + parent::__construct($context); /* This fake user have all rights */ $this->ignoreACL = TRUE; + } - /* Initialize ACL_CACHE */ - $this->reset_acl_cache(); + function loadLDAPInfo() + { + $this->cn = $this->dn; + $this->uid = $this->dn; } function getBase() -- GitLab