hello -
I am trying to figure out why a form page for login refuses to display
a field with the name employee_id.
code is as follows:
model:
class User extends AppModel {
var $useTable = 'employees';
var $primaryKey = 'employee_id';
}
controller:
class UsersController extends AppController {
var $name = 'Users';
var $helpers = array('Html', 'Form');
var $components = array('Auth');
function beforeFilter() {
Security::setHash("md5");
$this->Auth->fields = array('password' =>
'employee_password','username' => 'employee_id');
$this->Auth->loginAction = array('controller' => 'users',
'action' => 'login');
$this->Auth->loginRedirect = array('controller' =>
'dashboard', 'action' => 'index');
$this->Auth->loginError = 'No username and password was
found with that combination.';
$this->Auth->logoutRedirect = '/';
}
function login() {
}
function logout() {
$this->redirect($this->Auth->logout());
}
}
view:
$session->flash('auth');
echo $form->create('User', array('action' => 'login'));
echo $form->input('employee_id');
echo $form->input('employee_password');
echo $form->end('Login');
Yet the result is http://dl.dropbox.com/u/178319/cake-arg.jpeg
Any ideas why it refuses to show the input form field employee_id ?
Thanks
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
To unsubscribe, reply using "remove me" as the subject.