I'm making an ExpressionEngine extension that is supposed to return to a certain URL after the user logged in. I'm using this hook: member_member_login_single. This returns me to the right url, but it doesn't finish the whole login process. In other words: it's not logging my user in! How am I supposed to do this? There doesn't seem to be a hook like member_login_end.
function activate_extension()
{
$this->settings = array(
'prijs_per_kind' => 5,
'sluitingsdatum' => '05-11-2016',
);
$hooks = array(
"zoo_visitor_register_end" => "redirectToPayment",
"member_member_login_single" => "checkClosingDate"
);
foreach ($hooks as $hook => $method) {
$data = array(
'class' => __CLASS__,
'method' => $method,
'hook' => $hook,
'settings' => serialize($this->settings),
'priority' => 10,
'version' => $this->version,
'enabled' => 'y'
);
}
ee()->db->insert('extensions', $data);
}
function checkClosingDate()
{
ee()->functions->redirect('http://sportvandemaand.local/account/profiel/verlopen');
}