I have a problem using the function for automatic login after registration.
It appears that this script is not working, what can be the problem?
Code:
if ($parametersMod->getValue('community', 'user', 'options', 'autologin_after_registration')) {
$tmpUser = Db::userById($insertId);
if ($tmpUser) {
$this->login($tmpUser);
$redirectUrl = $this->redirectAfterLoginUrl();
$data = array (
'status' => 'success',
'redirectUrl' => $redirectUrl
);
$this->returnJson($data);
return;
}
}
ip_cms\modules\community\user\controller.php