PluginProbe
User Access Manager / 2.3.2
User Access Manager v2.3.2
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
← All changes | src/UserGroup/UserGroup.php +10 -15 2.3.162.3.2 View file →
@@ -28,9 +28,9 @@
28 28 Database $database,
29 29 MainConfig $config,
30 30 Util $util,
31 31 ObjectHandler $objectHandler,
32 - AssignedObjectsLoader $assignedObjectsLoader,
32 + AssignmentInformationFactory $assignmentInformationFactory,
33 33 int|string|null $id = null
34 34 ) {
35 35 parent::__construct(
36 36 $php,
@@ -38,9 +38,9 @@
38 38 $database,
39 39 $config,
40 40 $util,
41 41 $objectHandler,
42 - $assignedObjectsLoader
42 + $assignmentInformationFactory
43 43 );
44 44
45 45 if ($id !== null) {
46 46 $this->load($id);
@@ -71,27 +71,22 @@
71 71 LIMIT 1",
72 72 $id
73 73 );
74 74
75 - $databaseUserGroup = $this->database->getRow($query);
75 + $dbUserGroup = $this->database->getRow($query);
76 76
77 - if ($databaseUserGroup !== null) {
78 - $this->assignDatabaseValues($databaseUserGroup);
77 + if ($dbUserGroup !== null) {
78 + $this->id = $id;
79 + $this->name = $dbUserGroup->groupname;
80 + $this->description = $dbUserGroup->groupdesc;
81 + $this->readAccess = $dbUserGroup->read_access;
82 + $this->writeAccess = $dbUserGroup->write_access;
83 + $this->ipRange = $dbUserGroup->ip_range;
79 84
80 85 return true;
81 86 }
82 87
83 88 return false;
84 - }
85 -
86 - public function assignDatabaseValues(object $databaseUserGroup): void
87 - {
88 - $this->id = $databaseUserGroup->ID;
89 - $this->name = $databaseUserGroup->groupname;
90 - $this->description = $databaseUserGroup->groupdesc;
91 - $this->readAccess = $databaseUserGroup->read_access;
92 - $this->writeAccess = $databaseUserGroup->write_access;
93 - $this->ipRange = $databaseUserGroup->ip_range;
94 89 }
95 90
96 91 public function save(): bool
97 92 {