Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Q2A Core by


i can manage a redirect to a differentpage after login by changing

in qa-page-lgin.php, line 75.
the problem with that is, that direct links in notification emails doesn't work anymore. the user will always be redirected to 'redirectexamplepage' after they login.
we have a restricted q&a page, so user have to login to see any content.
appreciating any help,


Q2A version: 1.5.4

2 Answers

0 votes
I don't know how you have setup your restricted page but from my suggestion what you can do create a page for non logged in user and redirect them instead of redirecting logged in user.

This will become more easy by checking if user not logged in than redirect with header location and when logged in it will not in condition so they wil have access.
+1 vote

I have closed Q2A site too.

Although conservativeness is not so good, I redirect by theme. If it is made as follows, redirection feature of qa-login.php will process correctly direct link of notification e-mails. Keep in mind that it may not move correctly depending on the reconstruction state of core program. 

Exp code)  qa-theme/YourTheme/qa-theme.php

function doctype() {
  if (qa_get_logged_in_userid()===null) {
    $req = qa_request();
    if ($req != 'login'
      && $req != 'register'
      && $req != 'forgot'
      && $req != 'reset'
      && $req != 'feedback') {
         if ($req != '')
I am pleased if it becomes helpful.