summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/auth_internal/init.php2
-rw-r--r--plugins/auth_remote/init.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/auth_internal/init.php b/plugins/auth_internal/init.php
index 881d867cf..6dd79373d 100644
--- a/plugins/auth_internal/init.php
+++ b/plugins/auth_internal/init.php
@@ -116,7 +116,7 @@ class Auth_Internal extends Auth_Base implements IAuthModule2 {
if ($login) {
$user = ORM::for_table('ttrss_users')
- ->where('login', $login)
+ ->where_raw('LOWER(login) = LOWER(?)', [$login])
->find_one();
if ($user) {
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]);