Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Modify query

Hi,

For a plugin I'm writing I want to modify a query in the method 'Categories' in 'class.categorymodel.php' so that I can add an extra join and where condition (I want to fetch only categories linked to the current language of the user). How could I best achieve this?

Thanks in advance!

Tagged:

Answers

  • A better approach is to make a role for each language. Then give view permission for that category to that user.

    A user can have multiple roles, and it is is additive.

    grep is your friend.

  • Thanks. However, the language needs to be assigned/determined by using the current URL, so I need to be able to assign a 'language rol' to a user dynamically. Any idea how I could assign a rol dynamically?

    And just out of curiosity, do you know how I could best have changed that query :)?

Sign In or Register to comment.