Hey guys got a problem

Im trying to build a login with cakephp but for some reason it isnt working

so heres what I got for the users controller


var $helpers = array('Session');
	var $components = array('Auth','Session');

function beforeFilter(){
	parent::beforeFilter();
	$this->Auth->allow('index','view','add');
}

function login() {
}

function logout() {
    $this->redirect($this->Auth->logout());
}

And then for the login.ctp

    echo $session->flash('auth');
    echo $form->create('User', array('action' => 'login'));
    echo $form->input('username');
    echo $form->input('password');
    echo $form->end('Login');

 echo" Password " .$this->data['User']['password'] . "<br />";
 echo" Username " .$this->data['User']['username'] . "<br />";

But when I put information for loggin in into the input boxes, when I hit submit it says "Login failed. Invalid username or password."

So at the of the view Im echoing out the password and username.

The username shows up but the password doesnt, any ideas?

    Write a Reply...