diff --git a/lib/ycom_user.php b/lib/ycom_user.php index 56527e6..3a34051 100644 --- a/lib/ycom_user.php +++ b/lib/ycom_user.php @@ -96,4 +96,150 @@ public function increaseLoginTries(): self $this->setValue('login_tries', $this->getValue('login_tries') + 1); return $this; } + + + /* Login */ + /** @api */ + public function getLogin() : mixed { + return $this->getValue("login"); + } + /** @api */ + public function setLogin(mixed $value) : self { + $this->setValue("login", $value); + return $this; + } + + /* E-Mail */ + /** @api */ + public function getEmail() : mixed { + return $this->getValue("email"); + } + /** @api */ + public function setEmail(mixed $value) : self { + $this->setValue("email", $value); + return $this; + } + + /* Passwort */ + /** @api */ + public function setPassword(mixed $value) : self { + $this->setValue("password", $value); + return $this; + } + + /* Vorname */ + /** @api */ + public function getFirstname() : mixed { + return $this->getValue("firstname"); + } + /** @api */ + public function setFirstname(mixed $value) : self { + $this->setValue("firstname", $value); + return $this; + } + + /* Name */ + /** @api */ + public function getName() : mixed { + return $this->getValue("name"); + } + /** @api */ + public function setName(mixed $value) : self { + $this->setValue("name", $value); + return $this; + } + + /* Status */ + /** @api */ + public function getStatus() : mixed { + return $this->getValue("status"); + } + /** @api */ + public function setStatus(mixed $value) : self { + $this->setValue("status", $value); + return $this; + } + + /* Aktivierungsschlüssel */ + /** @api */ + public function getActivationKey() : mixed { + return $this->getValue("activation_key"); + } + /** @api */ + public function setActivationKey(mixed $value) : self { + $this->setValue("activation_key", $value); + return $this; + } + + /* Nutzungsbedingungen bestätigt */ + /** @api */ + public function getTermsofuseAccepted() : bool { + return (bool) $this->getValue("termsofuse_accepted"); + } + /** @api */ + public function setTermsofuseAccepted(bool $value = true) : self { + $this->setValue("termsofuse_accepted", $value); + return $this; + } + + /* Neues Passwort muss gesetzt werden */ + /** @api */ + public function getNewPasswordRequired() : bool { + return (bool) $this->getValue("new_password_required"); + } + /** @api */ + public function setNewPasswordRequired(bool $value = true) : self { + $this->setValue("new_password_required", $value); + return $this; + } + + /* Letzte Aktion */ + /** @api */ + public function getLastActionTime() : ?string { + return $this->getValue("last_action_time"); + } + /** @api */ + public function setLastActionTime(string $value) : self { + $this->setValue("last_action_time", $value); + return $this; + } + + /* Letzter erfolgreicher Login */ + /** @api */ + public function getLastLoginTime() : ?string { + return $this->getValue("last_login_time"); + } + /** @api */ + public function setLastLoginTime(string $value) : self { + $this->setValue("last_login_time", $value); + return $this; + } + + /* Kündigungszeitpunkt */ + /** @api */ + public function getTerminationTime() : ?string { + return $this->getValue("termination_time"); + } + /** @api */ + public function setTerminationTime(string $value) : self { + $this->setValue("termination_time", $value); + return $this; + } + + /* Login Fehlversuche */ + /** @api */ + public function getLoginTries() : ?int { + return $this->getValue("login_tries"); + } + /** @api */ + public function setLoginTries(int $value) : self { + $this->setValue("login_tries", $value); + return $this; + } + + /* Gruppen */ + /** @api */ + public function getYcomGroups() : ?rex_yform_manager_dataset { + return $this->getRelatedDataset("ycom_groups"); + } } diff --git a/plugins/group/lib/ycom_group.php b/plugins/group/lib/ycom_group.php index b79576d..030957a 100644 --- a/plugins/group/lib/ycom_group.php +++ b/plugins/group/lib/ycom_group.php @@ -74,4 +74,13 @@ public function getName(): string { return $this->getValue('name'); } + + /** @api */ + public function setName(mixed $value) : self + { + $this->setValue("name", $value); + return $this; + } + + }