From 07c9d0335439cb8a9f6c850383d21594d67121e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Mon, 25 May 2020 23:29:05 +0200 Subject: [PATCH] Fix wording/codestyle MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus Co-authored-by: Matthias Schmidt --- com.woltlab.wcf/templates/userNotice.tpl | 2 +- .../install/files/lib/data/user/User.class.php | 2 +- .../files/lib/data/user/UserAction.class.php | 16 ++++++++-------- .../action/UserClipboardAction.class.php | 2 +- wcfsetup/install/lang/de.xml | 4 ++-- wcfsetup/install/lang/en.xml | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/com.woltlab.wcf/templates/userNotice.tpl b/com.woltlab.wcf/templates/userNotice.tpl index 670a49511d..b3540f9664 100644 --- a/com.woltlab.wcf/templates/userNotice.tpl +++ b/com.woltlab.wcf/templates/userNotice.tpl @@ -20,7 +20,7 @@

{lang}wcf.user.register.needAdminActivation{/lang}

{/if} - {* user needs email activation w/o beeing disabled *} + {* user needs email activation w/o being disabled *} {if !$__wcf->user->isEmailConfirmed() && REGISTER_ACTIVATION_METHOD & 1 && $__wcf->user->isActivated() && $templateName != 'registerActivation' && $templateName != 'register' && $templateName != 'redirect' && $__wcf->user->getBlacklistMatches()|empty}

{lang}wcf.user.register.needEmailConfirmation{/lang}

{/if} diff --git a/wcfsetup/install/files/lib/data/user/User.class.php b/wcfsetup/install/files/lib/data/user/User.class.php index d9329523b7..e4f7560633 100644 --- a/wcfsetup/install/files/lib/data/user/User.class.php +++ b/wcfsetup/install/files/lib/data/user/User.class.php @@ -108,7 +108,7 @@ final class User extends DatabaseObject implements IRouteController, IUserConten const REGISTER_ACTIVATION_NONE = 0; const REGISTER_ACTIVATION_USER = 1; const REGISTER_ACTIVATION_ADMIN = 2; - const REGISTER_ACTIVATION_USER_AND_ADMIN = 3; // self::REGISTER_ACTIVATION_USER + self::REGISTER_ACTIVATION_ADMIN + const REGISTER_ACTIVATION_USER_AND_ADMIN = 3; // self::REGISTER_ACTIVATION_USER | self::REGISTER_ACTIVATION_ADMIN /** @noinspection PhpMissingParentConstructorInspection */ /** diff --git a/wcfsetup/install/files/lib/data/user/UserAction.class.php b/wcfsetup/install/files/lib/data/user/UserAction.class.php index 5427da2a7f..9d011bf2a8 100644 --- a/wcfsetup/install/files/lib/data/user/UserAction.class.php +++ b/wcfsetup/install/files/lib/data/user/UserAction.class.php @@ -635,19 +635,19 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio } /** - * Marks the email address as confirmed and enables the user, iff the register method is user activation only. - * @since 5.3 + * Marks the email address as confirmed. It also enables the user, iff the register method is user activation only. + + * @since 5.3 */ public function confirmEmail() { if (empty($this->objects)) $this->readObjects(); if (REGISTER_ACTIVATION_METHOD & User::REGISTER_ACTIVATION_ADMIN) { - $action = new UserAction($this->objects, 'update', [ + (new UserAction($this->objects, 'update', [ 'data' => [ - 'emailConfirmed' => null + 'emailConfirmed' => null, ] - ]); - $action->executeAction(); + ]))->executeAction(); } else { $this->enable(); @@ -684,7 +684,7 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio 'data' => [ 'activationCode' => 0, 'blacklistMatches' => '', - 'emailConfirmed' => null + 'emailConfirmed' => null, ], 'removeGroups' => UserGroup::getGroupIDsByType([UserGroup::GUESTS]) ]); @@ -728,7 +728,7 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio $action = new UserAction($this->objects, 'update', [ 'data' => [ 'activationCode' => UserRegistrationUtil::getActivationCode(), - 'emailConfirmed' => bin2hex(\random_bytes(20)) + 'emailConfirmed' => bin2hex(\random_bytes(20)), ], 'removeGroups' => UserGroup::getGroupIDsByType([UserGroup::USERS]) ]); diff --git a/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php b/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php index 19f87d2daa..4436a3e7bc 100644 --- a/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php +++ b/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php @@ -276,7 +276,7 @@ class UserClipboardAction extends AbstractClipboardAction { $userIDs = []; foreach ($this->objects as $user) { - if ($user->is) $userIDs[] = $user->userID; + if (!$user->isActivated()) $userIDs[] = $user->userID; } return $userIDs; diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index cd522ff97b..be8d56c679 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -4607,7 +4607,7 @@ sich{/if} nicht bei uns registriert {if LANGUAGE_USE_INFORMAL_VARIANT}hast{else} - + @@ -4740,7 +4740,7 @@ Sie sich{/if} bitte an den Administrator unter: {@MAIL_ADMIN_ADDRESS}. Wenn {if dich{else}Sie sich{/if} nicht bei uns registriert {if LANGUAGE_USE_INFORMAL_VARIANT}hast{else}haben{/if}, dann {if LANGUAGE_USE_INFORMAL_VARIANT}kannst du{else}können Sie{/if} diese E-Mail ignorieren.]]> - Aktivieren Sie jetzt Ihre E-Mail-Adresse]]> + {if LANGUAGE_USE_INFORMAL_VARIANT}Bestätige jetzt deine{else}Bestätigen Sie jetzt Ihre{/if} E-Mail-Adresse.]]> username}. {if LANGUAGE_USE_INFORMAL_VARIANT}Deine{else}Ihre{/if} Registrierung ist hiermit vollständig abgeschlossen.]]> username}.
diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 409ea13221..8f8f2ab537 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -4603,7 +4603,7 @@ not register with us.]]>
- + -- 2.20.1