From: Matthias Schmidt Date: Mon, 24 Mar 2014 18:29:41 +0000 (+0100) Subject: Optimizes code X-Git-Tag: 2.1.0_Alpha_1~980 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3696fe93f90ec648e0841550936a1e1112ebe567;p=GitHub%2FWoltLab%2FWCF.git Optimizes code --- diff --git a/wcfsetup/install/files/lib/data/user/UserAction.class.php b/wcfsetup/install/files/lib/data/user/UserAction.class.php index 902733afcd..4e61f3c91c 100644 --- a/wcfsetup/install/files/lib/data/user/UserAction.class.php +++ b/wcfsetup/install/files/lib/data/user/UserAction.class.php @@ -541,17 +541,7 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio * Validates the 'disableSignature' action. */ public function validateDisableSignature() { - WCF::getSession()->checkPermissions(array('admin.user.canDisableSignature')); - - $this->__validateAccessibleGroups(); - - if (empty($this->objects)) { - $this->readObjects(); - - if (empty($this->objects)) { - throw new UserInputException('objectIDs'); - } - } + $this->validateEnableSignature(); $this->readString('disableSignatureReason', true); } @@ -608,17 +598,7 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio * Validates the 'disableAvatar' action. */ public function validateDisableAvatar() { - WCF::getSession()->checkPermissions(array('admin.user.canDisableAvatar')); - - $this->__validateAccessibleGroups(); - - if (empty($this->objects)) { - $this->readObjects(); - - if (empty($this->objects)) { - throw new UserInputException('objectIDs'); - } - } + $this->validateEnableAvatar(); $this->readString('disableAvatarReason', true); }