User should not have a pending activation
$redirectText = WCF::getLanguage()->getDynamicVariable('wcf.user.registerActivation.success');
}
- $command = new RegistrationNotification($this->user);
+ // User must be reloaded to get the correct activation status.
+ $command = new RegistrationNotification(new User($this->user->userID));
$command();
HeaderUtil::delayedRedirect(LinkHandler::getInstance()->getLink(), $redirectText, 10, 'success', true);
public function __invoke(): void
{
- if (!$this->user->requiresAdminActivation() && !$this->user->pendingActivation()) {
+ if ($this->user->pendingActivation() && !$this->user->requiresAdminActivation()) {
return;
}