欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

不同的角色 不同的首页 drupal different index pages different role

shiping1 的头像

平忠使用的是
1)rules方法 判断用户登录触发事件 好像不灵
或者
2)在 init方法里 进行判断角色,进行drupal_goto()跳转

只是url变了
这取决于用户的角色不同的索引页

我怎么可以有不同的索引页取决于登录用户的角色?

评论

我不完全知道你所说的'索引页“的意思,但如果你只是想将用户重定向到基于角色登录时特定的页面,你可以做到这一点与http://drupal.org/project/ruleshttp://drupal.org/project/login_destination模块。如果你只需要重定向,login_destination可能是最好的选择。但规则是如此强大,如果你要使用任何其他的功能,那么你就还需要login_destination。



different index pages depending on the role of user

How can I have different index pages depending on the role of the logged-in user?

Comments

I'm not exactly sure what you mean by 'index page', but if you just want to redirect your users to particular page upon login based on role, you can do that with thehttp://drupal.org/project/rules or http://drupal.org/project/login_destination modules. If you only need redirect, login_destination is probably the best choice. But rules is so powerful, if you're going to use any of the other functionality, then you don't also need login_destination.

_


 

普通分类: