mirror of https://github.com/MISP/MISP
pull/4075/head
parent
3676000075
commit
9afd0d8600
|
@ -333,6 +333,7 @@ class AppController extends Controller
|
|||
}
|
||||
} else {
|
||||
if (!($this->params['controller'] === 'users' && $this->params['action'] === 'login')) {
|
||||
$this->Session->write('pre_login_requested_url', $this->here);
|
||||
$this->redirect(array('controller' => 'users', 'action' => 'login', 'admin' => false));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1065,7 +1065,11 @@ class UsersController extends AppController
|
|||
public function routeafterlogin()
|
||||
{
|
||||
// Events list
|
||||
$this->redirect(array('controller' => 'events', 'action' => 'index'));
|
||||
$url = $this->Session->consume('pre_login_requested_url');
|
||||
if (empty($url)) {
|
||||
$url = array('controller' => 'events', 'action' => 'index');
|
||||
}
|
||||
$this->redirect($url);
|
||||
}
|
||||
|
||||
public function logout()
|
||||
|
|
Loading…
Reference in New Issue