Closed (fixed)
Project:
Rules
Version:
6.x-1.2
Component:
Rules Engine
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Aug 2010 at 22:14 UTC
Updated:
31 Aug 2010 at 03:10 UTC
Hello,
What I have:
I have a website where the content for anonymous users can be viewed either in Dutch or French. Logged in users can only view the content in English. There is a login form on every page.
What I want:
When a user logs in from say: /nl/example-page , the page when logged in will be the same, meaning the /nl/example-page still showing content in Dutch. Is it possible to fire a language switch rule when logging in?
Is this possible with the rules module? If not, are there any other ways to achieve this?
Thanks in advance.
Cheers,
Danny
Comments
Comment #1
polI don't think this is a matter of switching because you disallow one language.
I think a custom hook_node_access() will do the trick.
Comment #2
mitchell commentedYes, you could potentially switch the user's locale, but you would then need to prevent them from changing it themselves. Disable user language looks like a good choice.
The next step would be to wrap user_preferred_language() in an action. See theme_rules for an example of how that can be done, but more importantly, see http://drupal.org/node/298522.