summaryrefslogtreecommitdiffstats
path: root/glpi-0.85-bug5218.patch
blob: 0da9fe6bff748d59164eb92293ba6e77c9c797ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Index: trunk/inc/user.class.php
===================================================================
--- trunk/inc/user.class.php	(révision 23364)
+++ trunk/inc/user.class.php	(révision 23365)
@@ -602,7 +602,9 @@
       // Add default profile
       if (!$rulesplayed) {
          $affectation = array();
-         if (isset($this->input['_profiles_id']) && $this->input['_profiles_id']) {
+         if (isset($this->input['_profiles_id']) && $this->input['_profiles_id']
+            && Profile::currentUserHaveMoreRightThan(array($this->input['_profiles_id']))
+            ) {
             $profile                   = $this->input['_profiles_id'];
             // Choosen in form, so not dynamic
             $affectation['is_dynamic'] = 0;