Piwik authentication string visible on all user/%/edit sub-tabs

martinquested - October 27, 2009 - 16:17
Project:Piwik - Web analytics
Version:6.x-1.1
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

In file piwik_reports.module, lines 219-220 read:

<?php
 
// Extend the form in "user/{userid}/edit".
 
if ('user_profile_form' == $form_id && user_access('access site reports')) {
?>

This results in the fieldset 'Piwik configuration', containing the user's Piwik authentication string, appearing on all sub-tabs of the edit tab of a user account. By default, there is only the one section, but modules may define sub-tabs (categories) and the Piwik configuration really shouldn't be appearing on them. This is fixed by changing those lines to:

<?php
 
// Extend the form in "user/{userid}/edit/account".
 
if ('user_profile_form' == $form_id && user_access('access site reports') && $form['_category']['#value'] == 'account') {
?>

#1

hass - October 27, 2009 - 21:52
Status:active» fixed

Committed fix to CVS. THX for your help.

#2

System Message - November 10, 2009 - 22:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.