We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21b00b6 commit c50b73dCopy full SHA for c50b73d
inc/profile.class.php
@@ -177,10 +177,14 @@ public static function initProfile()
177
{
178
global $DB;
179
180
- foreach ($DB->request("SELECT *
181
- FROM `glpi_profilerights`
182
- WHERE `profiles_id`='".$_SESSION['glpiactiveprofile']['id']."'
183
- AND `name` LIKE '%plugin_addressing%'") as $prof) {
+ $it = $DB->request([
+ 'FROM' => 'glpi_profilerights',
+ 'WHERE' => [
+ 'profiles_id' => $_SESSION['glpiactiveprofile']['id'],
184
+ 'name' => ['LIKE', '%plugin_addressing%']
185
+ ]
186
+ ]);
187
+ foreach ($it as $prof) {
188
if (isset($_SESSION['glpiactiveprofile'])) {
189
$_SESSION['glpiactiveprofile'][$prof['name']] = $prof['rights'];
190
}
0 commit comments