I have a custom plugin, for which users need to be logged in to use. I've added this in the process_request function:
$qa_content['error'] = 'Please <a href="' . $this->urltoroot . 'login?to=">log in</a> or <a href="' . $this->urltoroot . 'register?to=">register</a> to vote.';
Is there a better way to do this, e.g. through a Q2A function?