Projet

Général

Profil

Révision f8e16685

Ajouté par Assos Assos il y a plus de 5 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/uuid/uuid_services/uuid_services.module
170 170
        }
171 171
      }
172 172
    }
173

  
174
    // Sanitize user roles if user is not allowed to modify them.
175
    if ($entity_type == 'user' && !empty($entity->roles) && !user_access('administer permissions')) {
176
      $original_user = user_load(entity_get_id_by_uuid('user', array($entity->uuid))[$entity->uuid]);
177
      $entity->roles = $original_user->roles;
178
    }
179

  
173 180
    entity_uuid_save($entity_type, $entity);
174 181
    return $entity;
175 182
  }
......
194 201
      return TRUE;
195 202
    }
196 203

  
197
    $return = entity_uuid_delete($entity_type, array($uuid)) !== FALSE;
204
    $return = entity_uuid_delete($entity_type, $uuid) !== FALSE;
198 205
    return $return;
199 206
  }
200 207
  catch (Exception $exception) {

Formats disponibles : Unified diff