Hi i am new to cake php, when i am creating a login authentication using
app controller the following error was showed so please help me out. here
data base i am using postgress sql, here i dont have permission to chanage
the databse.
this is app_controller.php
--------------------------------------
<?php
class AppController extends Controller {
var $components = array('Auth', 'RequestHandler');
var $uses = array ('Tbluser') ;
var $helpers = array('Javascript','Html','Form','Ajax');
function beforeFilter(){
$this->Auth->loginAction = array('admin' => false, 'controller' =>
'tblusers', 'action' => 'login');
$this->Auth->authError = "Sorry, you are lacking access.";
$this->Auth->loginError = "No, you fool! That's not the right
password!";
$this->Auth->userModel = 'Tbluser';
$this->Auth->authorize = 'tblusers';
$this->Auth->fields = array('username' => 'struid', 'password' =>
'strpid');
$this->Auth->allow('login');
$username = $this->Auth->user('struid');
$id = $this->Auth->user('lnguser');
$this->set('userId', $this->Auth->user('lnguser'));
$this->Auth->loginRedirect = array('controller' => 'tblusers',
'action' => 'index');
}
function isAuthorized() {
return true;
}
}
?>
Error Message :
------------------------
*Warning* (512) <javascript:void(0);>: Auth::isAuthorized() -
$authorize is set to an incorrect value. Allowed settings are:
"actions", "crud", "model" or null.
[*CORE/cake/libs/controller/components/auth.php*, line *525*]
*Warning* (2) <javascript:void(0);>: Cannot modify header information
- headers already sent by (output started at
/var/www/wizard_auth/cake/basics.php:108)
[*CORE/cake/libs/controller/controller.php*, line *646*]
Please any one can help me out...thanks in advance..!
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 [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en