public function register_url()
{
$template_dir = $this->app->template->dir();
$file = $template_dir . 'register.php';
$default_url = false;
if (is_file($file)) {
$default_url = 'register';
} else {
$default_url = 'users/register';
}
$checkout_url = $this->app->option_manager->get('register_url', 'users');
if ($checkout_url != false and trim($checkout_url) != '') {
$default_url = $checkout_url;
}
$checkout_url_sess = $this->session_get('register_url');
if ($checkout_url_sess == false) {
return $this->app->url_manager->site($default_url);
} else {
return $this->app->url_manager->site($checkout_url_sess);
}
}