Adding that snippet to the controller caused an error, so I read
through the documentation link you sent through, and that has resolved
the errors. However, now, it's just not working. When I submit a
username and password, I just get redirected back to the form, with
the username truncated to just 1 letter. Regardless of what I input
to the form (correct or incorrect) it just does the same thing, and
doesn't let me in to the rest of the admin system.
The code I have in the 'controllers/users_controller.php' file is:
<?php
class UsersController extends AppController {
var $name = 'Users';
var $components = array('Auth'); // Not necessary if declared in
your app controller
/**
* The AuthComponent provides the needed functionality
* for login, so you can leave this function blank.
*/
function login() {
}
function logout() {
$this->redirect($this->Auth->logout());
}
}
?>
The code in the views/users/index.ctp file is:
<?php
if ($session->check('Message.auth')) $session->flash('auth');
echo $form->create('User', array('action' => 'login'));
echo $form->input('username');
echo $form->input('password');
echo $form->end('Login');
?>
Totally confused! Can someone point me in the right direction to get
this simple thing working?
Thanks all...
--~--~---------~--~----~------------~-------~--~----~
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