Authentication CakePHP 2 Auth在尝试登录时不执行任何操作

Authentication CakePHP 2 Auth在尝试登录时不执行任何操作,authentication,cakephp-2.1,Authentication,Cakephp 2.1,我使用的是cakePHP 2,当我的一位客户尝试登录应用程序时,我遇到了一个奇怪的问题。故事是这样的:她在数据库中设置了一个帐户,我可以使用她的帐户信息登录,但她不能。她没有显示任何错误(如错误的电子邮件/密码)。 当她按login时,她再次点击登录表单 因此,在我的AppController.php中 public $components = array( 'Acl', 'Auth' => array( 'authorize' =>

我使用的是cakePHP 2,当我的一位客户尝试登录应用程序时,我遇到了一个奇怪的问题。故事是这样的:她在数据库中设置了一个帐户,我可以使用她的帐户信息登录,但她不能。她没有显示任何错误(如错误的电子邮件/密码)。 当她按login时,她再次点击登录表单

因此,在我的AppController.php中

public $components = array(
    'Acl',
    'Auth' => array(
                'authorize' => array('Actions' => array('actionPath' => 'controllers')),
                'authenticate' => array('Form' => array('fields' => array('username' => 'email')))
    ),
    'RequestHandler',
    'Session'
);

public function beforeFilter() {
    $group = $this->Auth->user('Group.name');
    $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
    $this->Auth->logoutRedirect = array('controller' => 'users', 'action' => 'login');

    if ($group == 'customer') {
        $this->layout = "customer";
        $this->Auth->loginRedirect = array('controller' => 'overviews', 'action' => 'index');
    }
    else {
        $this->layout = "default";
        $this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'index');
    }
 }
在我的Config/core.php中

Configure::write('Session', array(
    'defaults'          => 'cake',
    'checkAgent'        => false,
    'timeout'           => '120',
));


Configure::write('Security.level', 'low');
我真的不知道问题出在哪里。。。我无法在自己的电脑上重现这个问题

编辑:userscocontroller.php登录()


尝试从登录操作中删除手动重定向:

$this->redirect(array('controller' => 'pages', 'action' => 'index'));
您已经设置了Auth组件的
loginDirect
属性

否则这很奇怪。要求用户清除所有broswer缓存-cookies+缓存。 还要检查服务器上的所有
tmp
dir是否可由Web服务器用户写入-这包括系统
tmp
目录


请对此帖子发表评论,以便我们可以继续尝试解决此问题。它指向一个客户端问题,但你永远不知道D

Users
控制器中发布登录操作的代码。也许问题就在那里。非常重要的问题:所有用户都有这个问题还是只有这个问题?只有一个用户来自特定的计算机(mac)。我更新了帖子,所以我试图删除手动重定向,但当我尝试登录时,什么也没做(我再次点击登录页面)。我还要求用户清除所有broswer缓存,包括cookie。但是没有解决问题。@kdelemme什么是用户浏览器?这真的很难理解你能让她试试另一个浏览器吗?例如Firefox,因为Chrome和Safari都使用WebKit。这可能是一个与WebKit相关的问题,嗯。还是很奇怪D
$this->redirect(array('controller' => 'pages', 'action' => 'index'));