mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Add user repository as a service
This commit is contained in:
@@ -88,8 +88,8 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract
|
||||
if ($this->shouldSendNotificationFor($params['to'])) {
|
||||
$readyToSend = false;
|
||||
try {
|
||||
$user_from = $this->app['manipulator.user']->getRepository()->find($params['from']);
|
||||
$user_to = $this->app['manipulator.user']->getRepository()->find($params['to']);
|
||||
$user_from = $this->app['repo.users']->find($params['from']);
|
||||
$user_to = $this->app['repo.users']->find($params['to']);
|
||||
|
||||
$basket = $this->app['EM']
|
||||
->getRepository('Phraseanet:Basket')
|
||||
@@ -131,7 +131,7 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract
|
||||
$from = (string) $sx->from;
|
||||
$ssel_id = (string) $sx->ssel_id;
|
||||
|
||||
if (null === $registered_user = $this->app['manipulator.user']->getRepository()->find($from)) {
|
||||
if (null === $registered_user = $this->app['repo.users']->find($from)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract
|
||||
*/
|
||||
public function is_available($usr_id)
|
||||
{
|
||||
if (null === $user = $this->app['manipulator.user']->getRepository()->find($usr_id)) {
|
||||
if (null === $user = $this->app['repo.users']->find($usr_id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user