ログイン時にパスワードのリセットページでアクセスが拒否されました

drupal.stackexchange https://drupal.stackexchange.com/questions/170660

  •  29-09-2020
  •  | 
  •  

質問

D7サイトを実行するのは、何らかの理由でユーザーがパスワードをリセットできるだけでなく、サーバー上でのみユーザーのみを実行していません。1回限りのログインリンクを持つEメールはちょうど元に送信されますが、ユーザーがリンクをクリックすると、汎用の「このページにアクセスする権限がない」という汎用の403ページが表示されます。私のローカルマシン上のサイトのクローン(SMTPモジュールを使用して電子メールを送信する)で、それはちょうどうまく機能します。問題は、user_edit_access()で発生します。ここで、$ account-> uidの値と$ glopals ['user'] - > uidを比較しているが、それはこの時点での推測です。

問題が何であるかについての提案は何ですか?サーバーはワニスを使用しているので、それが気になると思われるものですが、私はそれを考え出す方法はわかりません。

ありがとう。

役に立ちましたか?

解決

PATH \ Sites \ DefaultsのSettings.phpからの/* $cookie_domain = $_SERVER['HTTP_HOST']; */をコメントアウトします。\デフォルトはあなたのために機能します。

またはそれ以外の場合は、settings.php:

の下記のコードを使用してください。
<?php
/**
 * Drupal automatically generates a unique session cookie name for each site
 * based on its full domain name. If you have multiple domains pointing at the
 * same Drupal site, you can either redirect them all to a single domain (see
 * comment in .htaccess), or uncomment the line below and specify their shared
 * base domain. Doing so assures that users remain logged in as they cross
 * between your various domains. Make sure to always start the $cookie_domain
 * with a leading dot, as per RFC 2109.
 */
$cookie_domain = '.your_domain.com';
$conf['https'] = TRUE;
?>
.

匿名ユーザーを持つサイトでは、「www」を使用して「www」を使用して「www」を使用して「www」を使用しないように、これを設定しないように便利です。

ソース

ライセンス: CC-BY-SA帰属
所属していません drupal.stackexchange
scroll top