Settings header is shown

dboulet - January 16, 2008 - 21:43
Project:Fasttoggle
Version:5.x-1.0
Component:User interface
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed
Description

This module adds a Settings section in the user profile page with the option to toggle the user status, which is fine. The small problem is that the Settings header remains visible to the user even if they do not have the proper permissions to change their user status. This results in the Settings section being empty. It would be better if the header would only show up when there are options to display (when the user has the proper permissions).

#1

neofpo - February 25, 2008 - 21:15

I can also confirm this bug. Pretty annoying, should be easy to fix in theory.

#2

neofpo - February 25, 2008 - 21:50
Status:active» patch (code needs review)

Update:

I managed to fix the issue. At line 87 of fasttoggle.module, change the function to:

function fasttoggle_user($type, &$edit, &$user) {
  $settings = variable_get('fasttoggle_user_settings', array('status' => TRUE));

  if ($type == 'view' && $settings['status'] && ( user_access('administer users') || user_access('moderate users') )) {

I made no in depth verifications, some author should review this patch before applying it. It seems to work for me, use at risk.

#3

kkaefer - February 26, 2008 - 22:21
Status:patch (code needs review)» fixed

Thanks for reporting and providing a patch! The original bug report somehow slipped through my issue queue reviews... This is now fixed in 5 and 6.

#4

Anonymous (not verified) - March 11, 2008 - 22:21
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.