Optimizes code
authorMatthias Schmidt <gravatronics@live.com>
Mon, 24 Mar 2014 18:29:41 +0000 (19:29 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 24 Mar 2014 18:29:41 +0000 (19:29 +0100)
wcfsetup/install/files/lib/data/user/UserAction.class.php

index 902733afcde1fa211b6a339da7f041749cd49516..4e61f3c91ce06a00c8cb6eca7e60255d17faaa7a 100644 (file)
@@ -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);
        }