我是靠谱客的博主 安详雪碧,最近开发中收集的这篇文章主要介绍drupal setting.php,Drupal 7 Single Sign on using settings.php,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

Allow me to add a bit more detail using the following settings.php file entry:

$my_db_users = 'dbusers.shared_';

$databases['default']['default'] = array(

'driver' => 'mysql',

'database' => 'dbdefault',

'username' => 'databaseuser',

'password' => 'databasepassword',

'host' => '127.0.0.1',

'port' => 3066,

'prefix' => array(

'default' => 'default_',

'users' => $my_db_users,

'sessions' => $my_db_users,

'role' => $my_db_users,

'authmap' => $my_db_users,

),

'collation' => 'utf8_general_ci',

);

In the above instance, we have set a variable $my_db_users to be equal to the database and table prefix of the location of the shared user data.

We then set the default table prefix 'default' => 'default_', which says: "store all tables, unless otherwise specified, in defaultdatabase and make their table prefix default_." We're also saying: "store all users, sessions, roles, and user-role mappings (authmap) in the database dbusers with the table prefix shared_."

A slight twist:

Consider removing the 'authmap' => $my_db_users, line. If you do this you could have the same users and groups accross a large network of sites while still allowing users different permissions on different sites. On one site you may be an administrator, but on another you'd be an author.

最后

以上就是安详雪碧为你收集整理的drupal setting.php,Drupal 7 Single Sign on using settings.php的全部内容,希望文章能够帮你解决drupal setting.php,Drupal 7 Single Sign on using settings.php所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(51)

评论列表共有 0 条评论

立即
投稿
返回
顶部