Fixed default internal auth_provider

This commit is contained in:
Dmitry Khomutov 2017-02-05 16:54:59 +07:00
parent d73e6b0730
commit 31f1f1f3e9
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
4 changed files with 6 additions and 6 deletions

View file

@ -71,7 +71,7 @@ class CreateAdminCommand extends Command
$adminPass = $helper->ask($input, $output, $question);
try {
$userService->createUser($adminName, $adminEmail, 'default', json_encode(['type' => 'internal']), $adminPass, true);
$userService->createUser($adminName, $adminEmail, 'internal', json_encode(['type' => 'internal']), $adminPass, true);
$output->writeln('<info>User account created!</info>');
} catch (\Exception $e) {
$output->writeln(sprintf('<error>%s</error>', 'PHP Censor failed to create your admin account.'));

View file

@ -274,7 +274,7 @@ class InstallCommand extends Command
'disable_auth' => false,
'default_user_id' => 1,
'auth_providers' => [
'default' => [
'internal' => [
'type' => 'internal',
],
],
@ -476,7 +476,7 @@ class InstallCommand extends Command
/** @var UserStore $userStore */
$userStore = Factory::getStore('User');
$userService = new UserService($userStore);
$userService->createUser($admin['name'], $admin['email'], 'default', json_encode(['type' => 'internal']), $admin['password'], true);
$userService->createUser($admin['name'], $admin['email'], 'internal', json_encode(['type' => 'internal']), $admin['password'], true);
$output->writeln('<info>User account created!</info>');
} catch (\Exception $ex) {

View file

@ -180,7 +180,7 @@ class UserController extends Controller
$password = $this->getParam('password', null);
$isAdmin = (int)$this->getParam('is_admin', 0);
$this->userService->createUser($name, $email, 'default', json_encode(['type' => 'internal']), $password, $isAdmin);
$this->userService->createUser($name, $email, 'internal', json_encode(['type' => 'internal']), $password, $isAdmin);
$response = new b8\Http\Response\RedirectResponse();
$response->setHeader('Location', APP_URL . 'user');

View file

@ -45,7 +45,7 @@ class UserServiceTest extends \PHPUnit_Framework_TestCase
$user = $this->testedService->createUser(
'Test',
'test@example.com',
'default',
'internal',
json_encode(['type' => 'internal']),
'testing',
false
@ -62,7 +62,7 @@ class UserServiceTest extends \PHPUnit_Framework_TestCase
$user = $this->testedService->createUser(
'Test',
'test@example.com',
'default',
'internal',
json_encode(['type' => 'internal']),
'testing',
true