mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-19 04:51:17 +00:00

- rename podlibre to adaures - rename castopod-host to castopod - simplify README and redirect to docs site - move INSTALL and UPDATE docs - add new gitlabci pipeline to deploy docs - upgrade node to v16 in Dockerfile
42 lines
1011 B
PHP
42 lines
1011 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Class TestSeeder Inserts a superadmin user in the database
|
|
*
|
|
* @copyright 2020 Ad Aures
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
* @link https://castopod.org/
|
|
*/
|
|
|
|
namespace App\Database\Seeds;
|
|
|
|
use CodeIgniter\Database\Seeder;
|
|
|
|
class TestSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
/**
|
|
* Inserts an active user with the following credentials: username: admin password: AGUehL3P
|
|
*/
|
|
$this->db->table('users')
|
|
->insert([
|
|
'id' => 1,
|
|
'username' => 'admin',
|
|
'email' => 'admin@example.com',
|
|
'password_hash' =>
|
|
'$2y$10$TXJEHX/djW8jtzgpDVf7dOOCGo5rv1uqtAYWdwwwkttQcDkAeB2.6',
|
|
'active' => 1,
|
|
]);
|
|
|
|
$this->db
|
|
->table('auth_groups_users')
|
|
->insert([
|
|
'group_id' => 1,
|
|
'user_id' => 1,
|
|
]);
|
|
}
|
|
}
|