feat: soft-delete for teamer accounts
addresses #869dv9br3
This commit is contained in:
1 parent
388ecf9603
commit
d654ce77fb
45 files changed
+1151
-7
No files matched your search
@@ -97,6 +97,13 @@ class UserDataHandler
|
||||
/** @var User $user */
|
||||
$user = $users[0];
|
||||
|
||||
// A deleted account still has to be matched here, otherwise the caller would take
|
||||
// it for an unknown person and create a second account for them - resurrecting
|
||||
// them under a new row. It is returned as found, without writing anything to it.
|
||||
if (true === $user->isDeleted()) {
|
||||
return $user;
|
||||
}
|
||||
|
||||
$addressId = $profileResponse->getAddressId();
|
||||
$personId = $profileResponse->getPersonId();
|
||||
if (null === $addressId || null === $personId) {
|
||||
@@ -232,6 +239,12 @@ class UserDataHandler
|
||||
*/
|
||||
public function disableForRevokedCrmRoles(User $user): void
|
||||
{
|
||||
// a deleted account is already excluded from everything and must not be written
|
||||
// to by the CRM at all
|
||||
if (true === $user->isDeleted()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// an existing block may be a disciplinary one and must never be overwritten, but
|
||||
// findLocalUser() may have refreshed the BusPro ids and nothing else flushes here
|
||||
if (true === $user->isDisabled()) {
|
||||
|
||||
Reference in new issue
Block a user