Active
Project:
Subuser
Version:
6.x-1.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Oct 2011 at 05:16 UTC
Updated:
8 Oct 2011 at 05:17 UTC
Subuser module is showing the Subuser limit text field in additional tabs created by the profile module. Subuser should only create its form in the "account" category.
--- a/htdocs/sites/all/modules/subuser/subuser.module
+++ b/htdocs/sites/all/modules/subuser/subuser.module
@@ -244,7 +244,7 @@ function subuser_user($op, &$edit, &$account, $category = NULL) {
switch ($op) {
case 'form':
// Allow users with sufficient permission to limit the number of subusers on a per-user basis.
- if (user_access('administer subuser settings')) {
+ if (user_access('administer subuser settings') && $category == 'account') {
$user_limit = db_result(db_query("SELECT subuser_limit FROM {subuser_limit} WHERE uid=%d", $account->uid));
$form['subuser_limit'] = array(
'#type' => 'textfield',