Remove User_Adapter

This commit is contained in:
Nicolas Le Goff
2013-11-05 17:38:27 +01:00
parent 171390f7c8
commit c156f842c7
231 changed files with 3918 additions and 2986 deletions

View File

@@ -41,9 +41,7 @@ class module_console_checkExtension extends Command
$usrId = $input->getArgument('usr_id');
try {
$TestUser = \User_Adapter::getInstance($usrId, $this->container);
} catch (\Exception $e) {
if (null === $TestUser = $this->container['manipulator.user']->getRepository()->find($usrId)) {
$output->writeln("<error>Wrong user !</error>");
return 1;
@@ -52,8 +50,8 @@ class module_console_checkExtension extends Command
$output->writeln(
sprintf(
"\nWill do the check with user <info>%s</info> (%s)\n"
, $TestUser->get_display_name()
, $TestUser->get_email()
, $TestUser->getDisplayName()
, $TestUser->getEmail()
)
);
@@ -93,7 +91,7 @@ class module_console_checkExtension extends Command
$output->writeln("\n-- phrasea_create_session --");
$sessid = phrasea_create_session((string) $TestUser->get_id());
$sessid = phrasea_create_session((string) $TestUser->getId());
if (ctype_digit((string) $sessid)) {
$output->writeln("<info>Succes ! </info> got session id $sessid");

View File

@@ -81,9 +81,9 @@ class module_console_systemMailCheck extends Command
$id = $dialog->ask($output, '<question>Which id ?</question>', '');
try {
$tmp_user = User_Adapter::getInstance($id, $this->container);
$tmp_user = $this->container['manipulator.user']->getRepository()->find($id);
if ($tmp_user->get_email() != $email) {
if ($tmp_user->getEmail() != $email) {
throw new Exception('Invalid user');
}