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).

Comments

neofpo’s picture

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

neofpo’s picture

Status: Active » 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.

kkaefer’s picture

Status: 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.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

  • Commit 0ecb90b on 6.x-1.x, master by kkaefer:
    - #210860: Don't show the user status toggle when the user does not have...

  • Commit f6364a9 on master, 7.x-1.x by kkaefer:
    - #210860: Don't show the user status toggle when the user does not have...