init activity features #4

This commit is contained in:
ghost 2023-10-10 23:42:45 +03:00
parent c47c8ad83b
commit ef84fefca3
27 changed files with 1492 additions and 143 deletions

View file

@ -84,6 +84,7 @@ class UserService
$user->setApproved(true);
$user->setModerator(true);
$user->setSensitive(false);
$this->save($user);
}
@ -151,12 +152,14 @@ class UserService
int $userId,
int $userIdTarget,
int $added
): void
): bool
{
if ($userStar = $this->findUserStar($userId, $userIdTarget))
{
$this->entityManagerInterface->remove($userStar);
$this->entityManagerInterface->flush();
return false;
}
else
@ -169,6 +172,8 @@ class UserService
$this->entityManagerInterface->persist($userStar);
$this->entityManagerInterface->flush();
return true;
}
}