Hello all :)

I'm using the Auth to login into my system and I have a litle problem.

Any time I like to login I have to enter two times the Login
information.

i.e. :

I enter my login informations and press login.
After this my system return back to login screen
I re-enter my login informations and press login
After this my system go on controller and action that I have declare
on $this->Auth->loginRedirect.

Has any the solution to my problem ? ? ?

Following My Code :

APP_CONTROLLER

<?php

class AppController extends Controller
{
        var $helpers = array('Html','Form');
        var $components = array('Auth');

        function beforeFilter()
        {
                $this->Auth->loginRedirect = array
('controller'=>'Overview','action'=>'index');
        }

}

?>

USERS CONTROLLER

<?php

class UsersController extends AppController
{
        var $name = "Users";

        function login()
        {
                $this->layout = 'login';
                $this->set("PASS",$this->Auth->password('n1982m'));
        }

        function logout()
        {
                $this->Auth->logout();
                $this->redirect(array('controller'=>'Users','action'=>'login'));
        }

        function add()
        {

        }

}

?>


USER MODEL

<?php

class User extends AppModel
{
        var $name = "User";
}

?>

LOGIN VIEW

<?php e($form->create('User', array
('controller'=>'Users','action'=>'login'))) ?>
<div class="controls">
        <label><?php e(__('Username:')) ?></label>
        <?php e($form->text('username')) ?>
        <label><?php e(__('Password:')) ?></label>
        <?php e($form->password('password')) ?>
</div>
<div class="errors">

</div>
<?php e($form->submit()); ?>
<?php e($form->end()); ?>
<?php e($PASS); ?>

ADD VIEW

is empty


Thanks a lot :)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to