I don't have time at the moment to look through all of that (though I
do appreciate your thoroughness).  The first thing I would recommend
is try disabling all of your redirects from your related (user?)
controller's methods.  By doing so, you should once again be able to
see the SQL debug output which may give you an idea of where you would
need to look.

Alternatively, Mark Story's debug_kit plugin should let you see SQL
queries from previous requests.

On Feb 2, 4:28 pm, cricket <zijn.digi...@gmail.com> wrote:
> The site I'm working on had authentication working fine (it was one of
> the first things I set up). but suddenly I find that they no longer
> work. Auth isn't showing me anything helpful, and there are no SQL
> queries displayed (debug => 2), just the usual DESCRIBEs.
>
> Passwords were created using Security::hash($cleartext, null, true)
> but, as I said, these were fine before.
>
> I'm completely at a loss as to what's changed as I've been working on
> all public stuff and haven't been logged into the site for awhile now.
> Can anyone think of anything to check? I'm baffled.
>
> AppController:
>
> public $components = array('Auth', 'Session', 'Cookie',
> 'RequestHandler');
>
> public function beforeFilter()
> {
>         parent::beforeFilter();
>
>         $this->Auth->fields = array(
>                 'username' => 'email',
>                 'password' => 'password'
>         );
>         $this->Auth->loginAction = array(
>                 'controller' => 'users',
>                 'action' => 'login',
>                 'language' => $this->Session->read('Config.language')
>         );
>
>         $this->Auth->loginRedirect = array(
>                 'controller' => 'posts',
>                 'action' => 'index'
>         );
>         $this->Auth->logoutRedirect = array(
>                 'controller' => 'posts',
>                 'action' => 'index'
>         );
>
>         $admin = Configure::read('Routing.admin');
>
>         if (isset($this->params[$admin]) && $this->params[$admin])
>         {
>                 $this->layout = 'admin';
>         }
>
> }
>
> UserController:
>
> function beforeFilter()
> {
>         parent::beforeFilter();
>         $this->Auth->allowedActions = array('add', 'forgot_password',
> 'view');
>
> }
>
> public function login()
> {
>         //debug($this->Auth);
>
> }
>
> If I uncomment the line above, I see:
>
> [loginError] => Login failed. Invalid username or password.
> [authError] => You are not authorized to access that location.
>
> mysql> describe users;
> +---------------+------------------+------+-----+---------
> +----------------+
> | Field         | Type             | Null | Key | Default |
> Extra          |
> +---------------+------------------+------+-----+---------
> +----------------+
> | id            | int(10) unsigned | NO   | PRI | NULL    |
> auto_increment |
> | created       | datetime         | YES  |     | NULL
> |                |
> | modified      | datetime         | YES  |     | NULL
> |                |
> | last_login_ts | datetime         | YES  |     | NULL
> |                |
> | admin         | tinyint(1)       | YES  |     | 0
> |                |
> | enabled       | tinyint(1)       | YES  |     | 0
> |                |
> | email         | varchar(64)      | NO   | UNI | NULL
> |                |
> | password      | char(40)         | YES  |     | NULL
> |                |
> | name          | varchar(64)      | YES  |     | NULL
> |                |
> | bio           | text             | YES  |     | NULL
> |                |
> | display_email | tinyint(1)       | YES  |     | 0
> |                |
> +---------------+------------------+------+-----+---------
> +----------------+

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to