over 8 years ago
First of all load the component in the controller lets say UsersController using the below code
$this->uses=array(Auth);
login.view:
<?php echo $this->Form->create('User', array('id'=>'signUpForm','name'=>'userSignupForm', 'action'=>'login')); ?> <dl> <dt>User Name:</dt> <dd ><?php echo $this->Form->input('User.username', array('type'=>'text', 'label'=>false, 'div'=>false))?></dd> <dt>Password:</dt> <dd><?php echo $this->Form->input('User.password', array( 'type'=>'password','label'=>false, 'div'=>false)); ?></dd> </dl> <?php echo $this->Form->end('Login'); ?>
Write the code in login action of UsersController:
$this->Auth->login();
It will return 0= If logged in failed. Otherwise 1 if successfull.
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)