0

Drupal 7 でこれを使った人はいますか?

私が知る限り、Drupal はユーザーのログイン時に Cookie を使用します。このモジュールはログイン スクリプトの周りにチェックを作成しますか、それとも単に関数を提供するだけですか。コードの関連部分にこれらの関数を追加するのは開発者次第です。 (クッキーを設定する)?

次の PHP コードをそのまま使用できますか?

if(isset($_COOKIE['SITE_NAME_cookiecontrol']) && $_COOKIE['SITE_NAME_cookiecontrol'] == "yes")
            {
//set session here
}
4

2 に答える 2

0

I'm the developer of the Drupal Cookie Control module and from your question I cannot understand what you are trying to achieve.

The latest dev commits add a check around the user authentication to stop a log in if cookies are not yet accepted.

Other modules can now integrate in to the process with their own cookie restriction callbacks too.

于 2012-05-13T00:03:19.253 に答える
0

何をしようとしているのかは完全には明らかではありませんが、その Cookie をチェックしているだけの場合、問題が発生する可能性があります。

ほとんどの場合、uid キーがグローバル $user オブジェクトに設定されているかどうかを確認する必要があります。これには isset() を使用する必要はありません。if(){} で呼び出すことができます。

于 2012-05-01T16:15:59.977 に答える