Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

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!

Comments

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

    hgtonight
  • 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.