From 0e97e67be07000379037443a99f9d6eb8c32d208 Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Thu, 5 Oct 2017 11:41:54 +0200 Subject: [PATCH] Allow creating users with CertAuth via userDefaults, fixes #2538 --- .../Controller/Component/Auth/CertificateAuthenticate.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Plugin/CertAuth/Controller/Component/Auth/CertificateAuthenticate.php b/app/Plugin/CertAuth/Controller/Component/Auth/CertificateAuthenticate.php index 1ad5c481f..521ffc8db 100644 --- a/app/Plugin/CertAuth/Controller/Component/Auth/CertificateAuthenticate.php +++ b/app/Plugin/CertAuth/Controller/Component/Auth/CertificateAuthenticate.php @@ -132,7 +132,8 @@ class CertificateAuthenticate extends BaseAuthenticate self::$user = self::$client; // If $sync is true, allow the creation of the user from the certificate $sync = Configure::read('CertAuth.syncUser'); - if ($sync) { + $url = Configure::read('CertAuth.restApi.url'); + if ($sync && $url) { if (!self::getRestUser()) return false; }