know its supposed to look at the table named users. From my
understanding of cake its going to be looking for a class and table
called Tests unless you make it use another table.
IE: $uses = array('User');
On Aug 26, 3:58 am, cake fan <2ja...@gmail.com> wrote:
> i have the following controller implementing auth:
> <?php
> class TestsController extends AppController{
>
> var $components = array('Auth');
>
> function index(){
> }
> function login(){
>
> }
> function logout(){
> $this->redirect($this->Auth->logout());
> }
> function welcome(){
> $this->autoRender = false;
> echo 'welcome';
> //print_r($_SESSION);
> }
> function allowed(){
> $this->autoRender=false;
> echo 'in allowed function';
> }
> function denied(){
> $this->autoRender=false;
> echo 'in denied function';
> }}
>
> ?>
> i also have a view for the login action:
> <?php
> echo $session->flash('auth');
> echo $form->create('User', array('action' => 'login'));
> echo $form->input('username');
> echo $form->input('password');
> echo $form->end('Login');
> ?>
> but the authentication doesnt work. it allows access to all the
> actions. but if i copy the Tests controller's code to a controller
> named 'Users' it works. can u help me pls?
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment