mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00
Remove User_Adapter
This commit is contained in:
@@ -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");
|
||||
|
@@ -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');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user