Page 1 of 1

Redirect after registration in script register users

Posted: 22 Oct 2016, 13:10
by maquis
Hello Admin,

I want to know how I can be able to redirect users to a thank you page after a successful registration instead of a confirmation email.

Thank you in anticipation.

Redirect after registration in script register users

Posted: 22 Oct 2016, 15:09
by Admin
Hello
1. In the "config.php" file set the value of the RANK constant to 1 (line 47):

Code: Select all

define('RANK', 1);
2. In the "class.UsersReg.php" file, replace this code (line 31, in the addUser() function):

Code: Select all

$msg = sprintf($this->lsite['register']['regmsg'], $username);
- with this:

Code: Select all

$msg ='ok-redirect';
3. In the "functions.js" file, replace this code (line 76, in the ajaxSend() function):

Code: Select all

else if(reID == adboxshow) $('#'+reID).html(clsadbox+response);
With this:

Code: Select all

else if(reID == adboxshow){
  if(response.indexOf('ok-redirect') !=-1) window.location ='/path/thank_you_page';
  else $('#'+reID).html(clsadbox+response);
}
- The redirect will be made in JS to the "/path/thank_you_page" page; when the php response contains the "ok-redirect" string.

Redirect after registration in script register users

Posted: 22 Oct 2016, 18:47
by maquis
Thank you very much sir. I have other questions that I will post soon, hope you will have the time to answer.