Posted by dboulet on January 16, 2008 at 9:43pm
Jump to:
| Project: | Fasttoggle |
| Version: | 5.x-1.0 |
| Component: | User interface |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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
#1
I can also confirm this bug. Pretty annoying, should be easy to fix in theory.
#2
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
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
Automatically closed -- issue fixed for two weeks with no activity.