Skip to content

Commit 2ba6d86

Browse files
committed
Getter/Setter für ycom_user und ycom_group ergänzt
1 parent 03c893a commit 2ba6d86

File tree

2 files changed

+161
-0
lines changed

2 files changed

+161
-0
lines changed

lib/ycom_user.php

+152
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,156 @@ public function increaseLoginTries(): self
9696
$this->setValue('login_tries', $this->getValue('login_tries') + 1);
9797
return $this;
9898
}
99+
100+
101+
/* Login */
102+
/** @api */
103+
public function getLogin() : mixed {
104+
return $this->getValue("login");
105+
}
106+
/** @api */
107+
public function setLogin(mixed $value) : self {
108+
$this->setValue("login", $value);
109+
return $this;
110+
}
111+
112+
/* E-Mail */
113+
/** @api */
114+
public function getEmail() : mixed {
115+
return $this->getValue("email");
116+
}
117+
/** @api */
118+
public function setEmail(mixed $value) : self {
119+
$this->setValue("email", $value);
120+
return $this;
121+
}
122+
123+
/* Passwort */
124+
/** @api */
125+
public function setPassword(mixed $value) : self {
126+
$this->setValue("password", $value);
127+
return $this;
128+
}
129+
130+
/* Vorname */
131+
/** @api */
132+
public function getFirstname() : mixed {
133+
return $this->getValue("firstname");
134+
}
135+
/** @api */
136+
public function setFirstname(mixed $value) : self {
137+
$this->setValue("firstname", $value);
138+
return $this;
139+
}
140+
141+
/* Name */
142+
/** @api */
143+
public function getName() : mixed {
144+
return $this->getValue("name");
145+
}
146+
/** @api */
147+
public function setName(mixed $value) : self {
148+
$this->setValue("name", $value);
149+
return $this;
150+
}
151+
152+
/* Status */
153+
/** @api */
154+
public function getStatus() : mixed {
155+
return $this->getValue("status");
156+
}
157+
/** @api */
158+
public function setStatus(mixed $value) : self {
159+
$this->setValue("status", $value);
160+
return $this;
161+
}
162+
163+
/* Aktivierungsschlüssel */
164+
/** @api */
165+
public function getActivationKey() : mixed {
166+
return $this->getValue("activation_key");
167+
}
168+
/** @api */
169+
public function setActivationKey(mixed $value) : self {
170+
$this->setValue("activation_key", $value);
171+
return $this;
172+
}
173+
174+
/* Nutzungsbedingungen bestätigt */
175+
/** @api */
176+
public function getTermsofuseAccepted(bool $asBool = false) : mixed {
177+
if($asBool) {
178+
return (bool) $this->getValue("termsofuse_accepted");
179+
}
180+
return $this->getValue("termsofuse_accepted");
181+
}
182+
/** @api */
183+
public function setTermsofuseAccepted(int $value = 1) : self {
184+
$this->setValue("termsofuse_accepted", $value);
185+
return $this;
186+
}
187+
188+
/* Neues Passwort muss gesetzt werden */
189+
/** @api */
190+
public function getNewPasswordRequired(bool $asBool = false) : mixed {
191+
if($asBool) {
192+
return (bool) $this->getValue("new_password_required");
193+
}
194+
return $this->getValue("new_password_required");
195+
}
196+
/** @api */
197+
public function setNewPasswordRequired(int $value = 1) : self {
198+
$this->setValue("new_password_required", $value);
199+
return $this;
200+
}
201+
202+
/* Letzte Aktion */
203+
/** @api */
204+
public function getLastActionTime() : ?string {
205+
return $this->getValue("last_action_time");
206+
}
207+
/** @api */
208+
public function setLastActionTime(string $value) : self {
209+
$this->setValue("last_action_time", $value);
210+
return $this;
211+
}
212+
213+
/* Letzter erfolgreicher Login */
214+
/** @api */
215+
public function getLastLoginTime() : ?string {
216+
return $this->getValue("last_login_time");
217+
}
218+
/** @api */
219+
public function setLastLoginTime(string $value) : self {
220+
$this->setValue("last_login_time", $value);
221+
return $this;
222+
}
223+
224+
/* Kündigungszeitpunkt */
225+
/** @api */
226+
public function getTerminationTime() : ?string {
227+
return $this->getValue("termination_time");
228+
}
229+
/** @api */
230+
public function setTerminationTime(string $value) : self {
231+
$this->setValue("termination_time", $value);
232+
return $this;
233+
}
234+
235+
/* Login Fehlversuche */
236+
/** @api */
237+
public function getLoginTries() : ?int {
238+
return $this->getValue("login_tries");
239+
}
240+
/** @api */
241+
public function setLoginTries(int $value) : self {
242+
$this->setValue("login_tries", $value);
243+
return $this;
244+
}
245+
246+
/* Gruppen */
247+
/** @api */
248+
public function getYcomGroups() : ?rex_yform_manager_dataset {
249+
return $this->getRelatedDataset("ycom_groups");
250+
}
99251
}

plugins/group/lib/ycom_group.php

+9
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,13 @@ public function getName(): string
7474
{
7575
return $this->getValue('name');
7676
}
77+
78+
/** @api */
79+
public function setName(mixed $value) : self
80+
{
81+
$this->setValue("name", $value);
82+
return $this;
83+
}
84+
85+
7786
}

0 commit comments

Comments
 (0)