From 9dd4102c7fe2ddfc67f91ad9034d734a4458cc01 Mon Sep 17 00:00:00 2001 From: wn_ Date: Sun, 4 Aug 2024 15:42:11 +0000 Subject: Replace basic 'isset()' cases with the null coalescing operator. --- plugins/auth_remote/init.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/auth_remote/init.php b/plugins/auth_remote/init.php index 2fb45fdef..3a1fa4c16 100644 --- a/plugins/auth_remote/init.php +++ b/plugins/auth_remote/init.php @@ -64,13 +64,13 @@ class Auth_Remote extends Auth_Base { // LemonLDAP can send user informations via HTTP HEADER if (Config::get(Config::AUTH_AUTO_CREATE)) { // update user name - $fullname = isset($_SERVER['HTTP_USER_NAME']) ? $_SERVER['HTTP_USER_NAME'] : ($_SERVER['AUTHENTICATE_CN'] ?? ""); + $fullname = $_SERVER['HTTP_USER_NAME'] ?? $_SERVER['AUTHENTICATE_CN'] ?? ''; if ($fullname){ $sth = $this->pdo->prepare("UPDATE ttrss_users SET full_name = ? WHERE id = ?"); $sth->execute([$fullname, $user_id]); } // update user mail - $email = isset($_SERVER['HTTP_USER_MAIL']) ? $_SERVER['HTTP_USER_MAIL'] : ($_SERVER['AUTHENTICATE_MAIL'] ?? ""); + $email = $_SERVER['HTTP_USER_MAIL'] ?? $_SERVER['AUTHENTICATE_MAIL'] ?? ''; if ($email){ $sth = $this->pdo->prepare("UPDATE ttrss_users SET email = ? WHERE id = ?"); $sth->execute([$email, $user_id]); -- cgit v1.2.3-54-g00ecf