From: joshuaruesweg Date: Wed, 24 Jun 2020 17:26:05 +0000 (+0200) Subject: Merge branch 'master' X-Git-Tag: 5.3.0_Alpha_1~182^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=73ab9ce154eb6afee90e1dcb26dd6d723cd0d3cf;p=GitHub%2FWoltLab%2FWCF.git Merge branch 'master' --- 73ab9ce154eb6afee90e1dcb26dd6d723cd0d3cf diff --cc wcfsetup/install/files/lib/acp/page/IndexPage.class.php index 8507138ea0,5d257203f2..7969ae88ec --- a/wcfsetup/install/files/lib/acp/page/IndexPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/IndexPage.class.php @@@ -1,6 -1,6 +1,7 @@@ getBlacklistMatches()); } + /** + * Returns true if this user is not activated. + * + * @return boolean + * @since 5.3 + */ + public function pendingActivation() { + return $this->activationCode != 0; + } + + /** + * Returns true if this user requires activation by the user. + * + * @return boolean + * @since 5.3 + */ + public function requiresEmailActivation() { + return REGISTER_ACTIVATION_METHOD & self::REGISTER_ACTIVATION_USER && $this->pendingActivation() && !$this->isEmailConfirmed(); + } + + /** + * Returns true if this user requires the activation by an admin. + * + * @return boolean + * @since 5.3 + */ + public function requiresAdminActivation() { + return REGISTER_ACTIVATION_METHOD & self::REGISTER_ACTIVATION_ADMIN && $this->pendingActivation(); + } + + /** + * Returns true if this user can confirm the email themself. + * + * @return boolean + * @since 5.3 + */ + public function canEmailConfirm() { + return REGISTER_ACTIVATION_METHOD & self::REGISTER_ACTIVATION_USER && !$this->isEmailConfirmed(); + } + + /** + * Returns true, if the user must confirm his email by themself. + * + * @return boolean + * @since 5.3 + */ + public function mustSelfEmailConfirm() { + return REGISTER_ACTIVATION_METHOD & self::REGISTER_ACTIVATION_USER; + } ++ + /** + * @inheritDoc + */ + public function getPopoverLinkClass() { + return 'userLink'; + } }