I’m working with the Rain\User plugin and I have my registration and my login on the same page (for now, it maybe does not make sense and I may change it).
When I click the “Confirm account” link in the “Confirm your account” email twice, I get a “User is already active!” (~/vendor/october/rain/src/Auth/Models/User.php line 258) error 500.
I know, that I may should put the registration on its own page, but I just wanted to ask, if I do something completely wrong?
Here’s is how I catch this error for now, in page code on said register and login page:
function onStart() {
$loggedIn = Auth::check();
if ($loggedIn) {
return \Redirect::to('/scan-petition');
}
$user = \Auth::getUser();
$params = $this->param('activate');
$activateParam = request()->get('activate');
if (null === $user && isset($activateParam)) {
return \Redirect::to('/'); // remove activate param by redirecting
}
}
Here are my page components with settings of which I’m also not sure about:
[session]
security = "all"
allowedUserGroups[] = "petition"
redirect = "scan-petition"
checkToken = 1
[account]
redirect = 0
paramCode = "code"
requirePassword = 0