Browse Source

Fixed find user by e-mail for GLPI >= 9.3

Edgard 6 years ago
parent
commit
3af6660eba
1 changed files with 7 additions and 1 deletions
  1. 7 1
      inc/provider.class.php

+ 7 - 1
inc/provider.class.php

@@ -522,7 +522,13 @@ class PluginSinglesignonProvider extends CommonDBTM {
          }
       }
 
-      if ($email && $user->getFromDBbyEmail($email, '')) {
+      $default_condition = '';
+
+      if (version_compare(GLPI_VERSION, '9.3', '>=')) {
+         $default_condition = array();
+      }
+
+      if ($email && $user->getFromDBbyEmail($email, $default_condition)) {
          return $user;
       }