2026-03-05 08:26:51 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Repository\User;
|
|
|
|
|
|
2026-03-13 21:58:51 +01:00
|
|
|
/** Contract for user creation, updates, activation, tenant assignment, and preference changes. */
|
2026-03-05 08:26:51 +01:00
|
|
|
interface UserWriteRepositoryInterface
|
|
|
|
|
{
|
|
|
|
|
public function updateLastLogin(int $userId, string $provider = 'local'): void;
|
|
|
|
|
|
|
|
|
|
public function bumpAuthzVersion(int $userId): bool;
|
|
|
|
|
|
|
|
|
|
public function bumpAuthzVersionByUserIds(array $userIds): int;
|
|
|
|
|
|
|
|
|
|
public function create(array $data): int|false;
|
|
|
|
|
|
|
|
|
|
public function update(int $id, array $data): bool;
|
|
|
|
|
|
|
|
|
|
public function setActive(int $id, bool $active, ?int $changedBy = null): bool;
|
|
|
|
|
|
|
|
|
|
public function setCurrentTenant(int $id, int $tenantId): bool;
|
|
|
|
|
|
|
|
|
|
public function setActiveByUuids(array $uuids, bool $active, ?int $modifiedBy = null): bool;
|
|
|
|
|
|
|
|
|
|
public function setInactiveByIds(array $userIds, ?int $changedBy = null): int;
|
|
|
|
|
|
|
|
|
|
public function deleteByIds(array $userIds): int;
|
|
|
|
|
|
|
|
|
|
public function setLocale(int $id, string $locale): bool;
|
|
|
|
|
|
|
|
|
|
public function setTheme(int $id, string $theme): bool;
|
|
|
|
|
|
|
|
|
|
public function updateProfileFieldsFromSso(int $id, array $fields): bool;
|
|
|
|
|
|
|
|
|
|
public function setPassword(int $id, string $password): bool;
|
|
|
|
|
|
|
|
|
|
public function setEmailVerified(int $id): bool;
|
|
|
|
|
|
|
|
|
|
public function delete(int $id): bool;
|
|
|
|
|
|
|
|
|
|
public function deleteByUuids(array $uuids): bool;
|
|
|
|
|
}
|