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

I'm actually modifiying `q2a-opn-login` plugin for some custom functionality. Like: I'm preventing some user to be logged in. And I putted condition inside qa-open-overrides.php file.

Now I want to redirect these restricted user to home page along with a message. Please help.

 

Thanks!

Q2A version: 1.6.3

1 Answer

+1 vote
by

 // For redirect

qa_redirect('' , array('state' => ($login_error ? 'login-error' : 'login-succ')));
 
// then after rediret to show the error message  .. For doing this create a layer file in the plugin folder and add the below lines in doctype() . 
 
$state = qa_get_state();
 
if ($state == 'login-error')
$pageerror = "Login Unsuccessful . Please check your email address .. Blah blah ";
 
$qa_content['error'] = @$pageerror;
 
...