1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Can't remove regular member from "Users with Custom Permissions" list

Discussion in 'XenForo Questions and Support' started by imthebest, Apr 16, 2015.

  1. imthebest

    imthebest Formerly Super120

    Facts:

    1. I have already checked that all his permissions are set to "Not set" and that every value is set to zero.
    2. The user belongs to the registered members group without any additional secondary usergroup.
    3. The user doesn't have any node specific custom permissions.

    What could be happening? Maybe an old add-on leave a hidden and thus uneditable (through the ACP UI) permission?

    Thanks,
    Super120
     
    Last edited: Apr 16, 2015
  2. imthebest

    imthebest Formerly Super120

    Any ideas will be more than welcome!
     
  3. Brogan

    Brogan XenForo Moderator Staff Member

    Try toggling one of the permissions for the user, saving, setting it to not set and saving again.

    That may update the permission cache.
     
  4. imthebest

    imthebest Formerly Super120

    Unfortunately it didn't worked :(
     
  5. Mike

    Mike XenForo Developer Staff Member

    Last time I saw this, it had something to do with an add-on inserting permissions manually into a permission (interface) group that didn't actually exist. It meant the permission was valid, it just wasn't going to be displayed.

    You can look in xf_permission_entry / xf_permission_entry_content and remove any records that belong to the specified user_id (after verifying that you're removing what you expect).
     
    imthebest likes this.
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Run this query and paste the results here:
    Code:
    SELECT * FROM xf_permission_entry WHERE user_id =x;
    Replace x with the user ID.
     
    imthebest likes this.
  7. imthebest

    imthebest Formerly Super120

    Here you go:

    Code:
    mysql> SELECT * FROM xf_permission_entry WHERE user_id = 1;
    +---------------------+---------------+---------+---------------------+---------------------------+------------------+----------------------+
    | permission_entry_id | user_group_id | user_id | permission_group_id | permission_id             | permission_value | permission_value_int |
    +---------------------+---------------+---------+---------------------+---------------------------+------------------+----------------------+
    |                 114 |             0 |       1 | resource            | Tinhte_XenTag_resourceAll | allow            |                    0 |
    |                 120 |             0 |       1 | resource            | TXT_resourceMaximumTags   | use_int          |                   -1 |
    +---------------------+---------------+---------+---------------------+---------------------------+------------------+----------------------+
    2 rows in set (0.00 sec)
    
    What should I do? :(
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    I suspected as much - we had another instance of that this week.

    The add-on in question (tinhte xentag) has inserted permission entries for custom permissions in the resource manager, despite not having it installed.
    Therefore XF doesn't know how to display them.

    To delete the entries you can select the checkbox in phpMyAdmin and then delete them, or delete the rows directly.
    Or, if you are sure you have the right user ID, run the following query:
    Code:
    DELETE FROM xf_permission_entry WHERE user_id = x;
    Replace x with the user ID.
     
    imthebest likes this.

Share This Page