Skip to content

Commit

Permalink
Getter/Setter für ycom_user und ycom_group ergänzt
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndr-w committed Apr 4, 2024
1 parent 03c893a commit 2ba6d86
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 0 deletions.
152 changes: 152 additions & 0 deletions lib/ycom_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,156 @@ 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 $asBool = false) : mixed {
if($asBool) {
return (bool) $this->getValue("termsofuse_accepted");
}
return $this->getValue("termsofuse_accepted");
}
/** @api */
public function setTermsofuseAccepted(int $value = 1) : self {
$this->setValue("termsofuse_accepted", $value);
return $this;
}

/* Neues Passwort muss gesetzt werden */
/** @api */
public function getNewPasswordRequired(bool $asBool = false) : mixed {
if($asBool) {
return (bool) $this->getValue("new_password_required");
}
return $this->getValue("new_password_required");
}
/** @api */
public function setNewPasswordRequired(int $value = 1) : 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");
}
}
9 changes: 9 additions & 0 deletions plugins/group/lib/ycom_group.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


}

0 comments on commit 2ba6d86

Please sign in to comment.