Hey guys, i want to have a method which i can reuse in certain situations (code below). The idea is this method to redirect to login in some of the cases. My problem is that after i redirect the rest of the code is executed, which i think is unwanted behaviour, correct me if im wrong. Thanks in advance.
PHP version: 5.5.23 / Phalcon: 2.0.3
public function indexAction()
{
$this->checkSomething();
// Problem here..
die('i should not be able to see this');
}
function checkSomething()
{
// some logic here, whatsoever
return $this->response->redirect('users/login');
// some more logic here
}