mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Merge branch 'replace_users' of https://github.com/nlegoff/Phraseanet into nlegoff-replace_users
Conflicts: lib/classes/ACL.php lib/classes/User/Adapter.php lib/classes/eventsmanager/notify/autoregister.php lib/classes/eventsmanager/notify/order.php lib/classes/eventsmanager/notify/orderdeliver.php lib/classes/eventsmanager/notify/ordernotdelivered.php lib/classes/eventsmanager/notify/push.php lib/classes/eventsmanager/notify/register.php lib/classes/eventsmanager/notify/validate.php lib/classes/eventsmanager/notify/validationdone.php lib/classes/eventsmanager/notify/validationreminder.php lib/classes/module/report/add.php lib/classes/module/report/edit.php lib/classes/module/report/push.php lib/classes/module/report/sent.php lib/classes/module/report/validate.php lib/classes/record/preview.php
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,13 +81,13 @@ 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');
|
||||
}
|
||||
|
||||
$tmp_user->set_email(null);
|
||||
$tmp_user->setEmail(null);
|
||||
|
||||
unset($users[$id]);
|
||||
} catch (\Exception $e) {
|
||||
|
Reference in New Issue
Block a user