1
0

Merge branch 'master' of github.com:agourd/dev-fsociety

This commit is contained in:
kcohenta 2015-12-03 23:15:02 +01:00
commit 2564d8f912
2 changed files with 13 additions and 19 deletions
src
Controller
Template/Users

@ -20,14 +20,16 @@ class UsersController extends AppController
public function login()
{
if ($this->request->is('post')) {
$user = $this->Auth->identify();
if ($user) {
$this->Auth->setUser($user);
return $this->redirect($this->Auth->redirectUrl());
}
$this->Flash->error(__('Invalid username or password, try again'));
}
if ($this->request->is('post'))
{
$user = $this->Auth->identify();
if ($user)
{
$this->Auth->setUser($user);
return $this->redirect($this->Auth->redirectUrl());
}
$this->Flash->error(__('Invalid username or password, try again'));
}
}
public function logout()

@ -4,23 +4,15 @@
<div class="formclass">
<div class="row">
<div class="medium-6 medium-centered large-4 large-centered columns">
<form>
<div class="row column log-in-form">
<h4 class="text-center">Log in with your administrator account</h4>
<h4 class="text-center">Log in with your administrator account</h4>
<?= $this->Form->create() ?>
<?= $this->Form->input('username') ?>
<?= $this->Form->input('password') ?>
<?= $this->Form->button('Log in !', ['class' => 'log-in-button']) ?>
<?= $this->Form->end() ?>
<p class="text-center"><a href="#">Forgot your password?</a></p>
<p class="text-center"><a href="#">Forgot your password?</a></p>
</div>
</form>
</div>
</div>
</div>
</div>