hi,
on http://api13.cakephp.org/class/auth-component:
# loginAction mixed
A URL (defined as a string or array) to the controller action that
handles logins.
This defaults to the users controller login action
Set it using $this->Auth->loginAction =
array('controller'=>'tests','action'=>'login')
check out: http://www.jbcrawford.net/archives/45
Regards,
Maurits
On 08/26/2010 10:58 AM, cake fan 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 [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