public $groups = array();
/**
- * clipboard item type id
+ * id of the user clipboard item object type
* @var integer
*/
- protected $typeID = null;
+ protected $objectTypeID = null;
/**
* @see wcf\page\IPage::readParameters()
public function readParameters() {
parent::readParameters();
- // get type id
- $this->typeID = ClipboardHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.user');
- if ($this->typeID === null) {
+ // get object type id
+ $this->objectTypeID = ClipboardHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.user');
+ if ($this->objectTypeID === null) {
throw new SystemException("clipboard item type 'com.woltlab.wcf.user' is unknown.");
}
- // get user ids
- $users = ClipboardHandler::getInstance()->getMarkedItems($this->typeID);
- if (!isset($users['com.woltlab.wcf.user']) || empty($users['com.woltlab.wcf.user'])) throw new IllegalLinkException();
+ // get user
+ $this->users = ClipboardHandler::getInstance()->getMarkedItems($this->objectTypeID);
+ if (empty($this->users)) {
+ throw new IllegalLinkException();
+ }
- // load users
- $this->userIDs = array_keys($users['com.woltlab.wcf.user']);
- $this->users = $users['com.woltlab.wcf.user'];
+ $this->userIDs = array_keys($this->users);
}
/**
$userEditor->addToGroups($groupsIDs, true, false);
}
- ClipboardHandler::getInstance()->removeItems($this->typeID);
+ ClipboardHandler::getInstance()->removeItems($this->objectTypeID);
SessionHandler::resetSessions($this->userIDs);
$this->saved();