Fixed default internal auth_provider
This commit is contained in:
parent
d73e6b0730
commit
31f1f1f3e9
|
@ -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.'));
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue