mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 13:03:20 +00:00
Add user repository as a service
This commit is contained in:
@@ -41,7 +41,7 @@ class module_console_checkExtension extends Command
|
||||
|
||||
$usrId = $input->getArgument('usr_id');
|
||||
|
||||
if (null === $TestUser = $this->container['manipulator.user']->getRepository()->find($usrId)) {
|
||||
if (null === $TestUser = $this->container['repo.users']->find($usrId)) {
|
||||
$output->writeln("<error>Wrong user !</error>");
|
||||
|
||||
return 1;
|
||||
|
@@ -81,7 +81,7 @@ class module_console_systemMailCheck extends Command
|
||||
$id = $dialog->ask($output, '<question>Which id ?</question>', '');
|
||||
|
||||
try {
|
||||
$tmp_user = $this->container['manipulator.user']->getRepository()->find($id);
|
||||
$tmp_user = $this->container['repo.users']->find($id);
|
||||
|
||||
if ($tmp_user->getEmail() != $email) {
|
||||
throw new Exception('Invalid user');
|
||||
|
@@ -295,7 +295,7 @@ class module_report_activity extends module_report
|
||||
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
|
||||
$login = $this->app['manipulator.user']->getRepository()->find($usr)->getDisplayName();
|
||||
$login = $this->app['repo.users']->find($usr)->getDisplayName();
|
||||
|
||||
$this->setChamp($rs);
|
||||
|
||||
|
@@ -77,7 +77,7 @@ class module_report_add extends module_report
|
||||
$value = $row['val'];
|
||||
$caption = $value;
|
||||
if ($field == "getter") {
|
||||
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
||||
if (null !== $user = $this->app['repo.users']->find($value)) {
|
||||
$caption = $user->getDisplayName();
|
||||
}
|
||||
} elseif ($field == 'date')
|
||||
|
@@ -77,7 +77,7 @@ class module_report_edit extends module_report
|
||||
$value = $row['val'];
|
||||
$caption = $value;
|
||||
if ($field == "getter") {
|
||||
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
||||
if (null !== $user = $this->app['repo.users']->find($value)) {
|
||||
$caption = $user->getDisplayName();
|
||||
}
|
||||
} elseif ($field == 'date') {
|
||||
|
@@ -78,7 +78,7 @@ class module_report_push extends module_report
|
||||
$value = $row['val'];
|
||||
$caption = $value;
|
||||
if ($field == "getter") {
|
||||
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
||||
if (null !== $user = $this->app['repo.users']->find($value)) {
|
||||
$caption = $user->getDisplayName();
|
||||
}
|
||||
} elseif ($field == 'date') {
|
||||
|
@@ -78,7 +78,7 @@ class module_report_sent extends module_report
|
||||
$value = $row['val'];
|
||||
$caption = $value;
|
||||
if ($field == "getter") {
|
||||
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
||||
if (null !== $user = $this->app['repo.users']->find($value)) {
|
||||
$caption = $user->getDisplayName();
|
||||
}
|
||||
} elseif ($field == 'date') {
|
||||
|
@@ -78,7 +78,7 @@ class module_report_validate extends module_report
|
||||
$value = $row['val'];
|
||||
$caption = $value;
|
||||
if ($field == "getter") {
|
||||
if (null !== $user = $this->app['manipulator.user']->getRepository()->find($value)) {
|
||||
if (null !== $user = $this->app['repo.users']->find($value)) {
|
||||
$caption = $user->getDisplayName();
|
||||
}
|
||||
} elseif ($field == 'date') {
|
||||
|
Reference in New Issue
Block a user