我运行一个d7站点,出于某种原因,不允许用户重置他们的密码,但仅在服务器上。使用One-Time Login Link的电子邮件已发送,但当用户点击链接时,它们会使用通用“您无权访问此页面”的消息。我知道这必须是服务器环境特定的,因为用我本地机器上的网站的克隆(使用SMTP模块发送电子邮件),它运行得很好。我猜这个问题发生在user_edit_access()中,它正在比较$ account-> uid的值,以$ globals ['user'] - > uid,但这只是此时猜测。

对问题可能是什么建议?服务器正在使用清漆,所以这是一个想到的想法,但我不确定如何弄清楚。

谢谢。

有帮助吗?

解决方案

从Settings.php中注释出来的/* $cookie_domain = $_SERVER['HTTP_HOST']; */从路径\ Sites \ Sites \默认值将为您工作。

或者在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;
?>
.

在带匿名用户的网站上,方便不设置这一点,以便您在一个标签上以admin登录,另一个在其中一个选项卡上的匿名登录。

source

许可以下: CC-BY-SA归因
scroll top