Co-authored-by: Tim Düsterhus <duesterhus@woltlab.com>
* @inheritDoc
*/
public function show() {
- if (!(REGISTER_ACTIVATION_METHOD & 1)) {
+ if (!(REGISTER_ACTIVATION_METHOD & User::REGISTER_ACTIVATION_USER)) {
throw new IllegalLinkException();
}
$this->saved();
// forward to index page
- if (REGISTER_ACTIVATION_METHOD & User::REGISTER_ACTIVATION_ADMIN && !$this->user->isActivated()) {
+ if ((REGISTER_ACTIVATION_METHOD & User::REGISTER_ACTIVATION_ADMIN) && !$this->user->isActivated()) {
$redirectText = WCF::getLanguage()->getDynamicVariable('wcf.user.registerActivation.success.awaitAdminActivation');
}
else {
// generate activation code
$addDefaultGroups = true;
- if (!empty($this->blacklistMatches) || (REGISTER_ACTIVATION_METHOD & User::REGISTER_ACTIVATION_USER && !$registerVia3rdParty) || REGISTER_ACTIVATION_METHOD & User::REGISTER_ACTIVATION_ADMIN) {
+ if (!empty($this->blacklistMatches) || (REGISTER_ACTIVATION_METHOD & User::REGISTER_ACTIVATION_USER && !$registerVia3rdParty) || (REGISTER_ACTIVATION_METHOD & User::REGISTER_ACTIVATION_ADMIN)) {
$activationCode = UserRegistrationUtil::getActivationCode();
$emailConfirmCode = bin2hex(\random_bytes(20));
$this->additionalFields['activationCode'] = $activationCode;