mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-04-01 01:25:39 +00:00
init activity features #4
This commit is contained in:
parent
c47c8ad83b
commit
ef84fefca3
27 changed files with 1492 additions and 143 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue