Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function login() {
- if ($this->request->is('post')) {
- if ($this->Auth->login()) {
- return $this->redirect();
- }
- $this->Session->setFlash('Incorrect user or password.');
- }
- }
- <h1>Access with your username:</h1>
- <?php
- echo $this->Form->create('User', array('action' => 'login'));
- echo $this->Form->input('username', array('label' => 'User:'));
- echo $this->Form->input('password', array('label' => 'Password:'));
- echo $this->Form->end('Login');
- ?>
- <div>
- <?php
- echo $this->Form->create('user', array('action' => 'login'));
- echo $this->Form->input('username', array('placeholder' => 'User', 'label' => false));
- echo $this->Form->input('password', array('placeholder' => 'Password', 'label' => false));
- echo $this->Form->submit('Ingresar', array('div' => true));
- echo $this->Form->end();
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement