1) I am puzzled how the redirect works after registration. I am talking about
qa_set_logged_in_user($userid, $inhandle);
$topath = qa_get('to');
if (isset($topath))
qa_redirect_raw(qa_path_to_root().$topath); // path already provided as URL fragment
else
qa_redirect('');
Due to my tests, as I understood, $topath is setted and it is redirected to the " path already provided as URL fragment". However, how this path is provided is not clear to me. I am really sorry if this is a stupid question, but I tracked down the system and I was not able to find out how the url fragment is provided.
2) In what situations $topath could not be setted.
3) It seems that I could redirect it to somewhere such as replacing "qa_redirect_raw(qa_path_to_root().$topath);" by "qa_redirect('account')". Could this cause any problem?