-
Notifications
You must be signed in to change notification settings - Fork 148
Expand file tree
/
Copy pathUserGroupAssignmentEditForm.class.php
More file actions
52 lines (44 loc) · 1.33 KB
/
UserGroupAssignmentEditForm.class.php
File metadata and controls
52 lines (44 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
namespace wcf\acp\form;
use wcf\data\user\group\assignment\UserGroupAssignment;
use wcf\system\exception\IllegalLinkException;
use wcf\system\exception\NamedUserException;
use wcf\system\WCF;
use wcf\util\HtmlString;
/**
* Shows the form to edit an existing automatic user group assignment.
*
* @author Olaf Braun, Matthias Schmidt
* @copyright 2001-2025 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/
class UserGroupAssignmentEditForm extends UserGroupAssignmentAddForm
{
/**
* @inheritDoc
*/
public $activeMenuItem = 'wcf.acp.menu.link.group.assignment';
/**
* @inheritDoc
*/
public $formAction = 'edit';
/**
* @inheritDoc
*/
public function readParameters()
{
parent::readParameters();
if (!isset($_REQUEST['id'])) {
throw new IllegalLinkException();
}
$this->formObject = new UserGroupAssignment(\intval($_REQUEST['id']));
if (!$this->formObject->assignmentID) {
throw new IllegalLinkException();
}
if ($this->formObject->isLegacy) {
throw new NamedUserException(
HtmlString::fromSafeHtml(WCF::getLanguage()->getDynamicVariable('wcf.acp.group.assignment.legacyNotice'))
);
}
}
}