CakePHP / Croogo登录问题

时间:2012-04-17 14:49:49

标签: cakephp cakephp-1.3

我正在尝试通过简单的登录表单在网站的主页上实现用户登录。我为用户创建了一个简单的表单,其中包含使用/users/login操作创建的用户名和密码字段。 users_controller/login函数非常简单:

$this->set('title_for_layout', __('Log in', true));

    if (!empty($this->data)) {  

            if (!$this->Auth->login($this->data)) {
                $this->Session->setFlash(__('Login Invalid.', true));
                $this->redirect("/");
            } else {
                $this->redirect($this->Auth->redirect());
            }
        }

使用管理员用户登录时,此操作。但是,如果我尝试使用注册用户登录,则会失败。我尝试将Auth->loginAction更改为/users/promoted并且没有看到任何结果,除了无法访问/admin/登录,这很好,因为管理员也可以通过主页登录。非常感到难过,非常感谢帮助!

谢谢,

迈克尔

1 个答案:

答案 0 :(得分:0)

原来这是与Croogo直接相关的问题。在Users->权限下,由于某种原因,已注册的角色设置为不允许用户/登录!