Merge branch 'master' of github.com:agourd/dev-fsociety
This commit is contained in:
commit
2564d8f912
src
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user