listSubscribe($_POST['listId'], $email, [], 'html', false)) { Session::set('list_success', __('Great success! Welcome to LBRY.')); } else { Session::set('list_error', __('Something went wrong adding you to the list.')); } } Controller::redirect($_POST['return_url'] ?: '/get'); } public static function prepareJoinList(array $vars) { $vars += ['btnClass' => 'btn-primary', 'returnUrl' => $_SERVER['REQUEST_URI']]; $vars['error'] = Session::get('list_error'); $vars['success'] = Session::get('list_success'); Session::unsetKey('list_error'); Session::unsetKey('list_success'); return $vars; } }