Saturday, December 6, 2008

SQL error with Auth Component?

So Im working with the auth component, heres my AppController.

class AppController extends Controller {

var $components = array('Auth');

function beforeFilter() {
// Authenticate
if (isset($this->Auth)) {
Security::setHash('md5');
$this->Auth->userScope = array('User.status' => 'active');
$this->Auth->loginAction = '/auth/login/';
$this->Auth->loginRedirect = '/dashboard/';
$this->Auth->logoutRedirect = '/';
}
}

}

And my beforeFilter in my controller:

function beforeFilter() {
// No authorize
$this->Auth->allow('signup', 'reset', 'verify', 'forgot');
}

That should all work and the signup... etc pages should not require
authorization... but I keep getting these SQL errors. It looks like it
thinks auth is a model.

Warning (512): SQL Error: 1064: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'allow' at line 1 [CORE\cake\libs\model
\datasources\dbo_source.php, line 521]

Query: allow
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: