Read the error message and obey: You have: $this->Auth->authorize = 'tblusers';
The error says: > Warning (512): 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] Jeremy Burns [email protected] On 8 Jun 2010, at 12:16, Narendra Padala wrote: > 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): 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): 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 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
