Website generation with Couscous

This commit is contained in:
Milos Stojanovic
2019-06-18 18:53:18 +02:00
parent f1028f0639
commit 305746b618

View File

@@ -108,8 +108,8 @@
],
</code></pre>
<h2 id="configuring-auth-service-to-use-database">Configuring Auth service to use database</h2>
<p>You can also mysql database to store your users.</p>
<p>First, create a table <code>users</code> with this sql:</p>
<p>You can also use mysql database to store your users.</p>
<p>First, create a table <code>users</code> with this sql query:</p>
<pre><code>CREATE TABLE `users` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
@@ -121,12 +121,12 @@
PRIMARY KEY (`id`),
KEY `username` (`username`)
) CHARSET=utf8 COLLATE=utf8_bin;</code></pre>
<p>Then, import default users with this query:</p>
<p>Then, import default users with sql query:</p>
<pre><code>INSERT INTO `users` (`username`, `name`, `role`, `permissions`, `homedir`, `password`)
VALUES
('guest', 'Guest', 'guest', '', '/', ''),
('admin', 'Admin', 'admin', 'read|write|upload|download|batchdownload|zip', '/', '$2y$10$Nu35w4pteLfc7BDCIkDPkecjw8wsH8Y2GMfIewUbXLT7zzW6WOxwq');</code></pre>
<p>At the end, open <code>configuration.php</code> and update AuthInterface handler to:</p>
<p>At the end, open <code>configuration.php</code> and update AuthInterface handler to reflect your database settings:</p>
<pre><code> 'Filegator\Services\Auth\AuthInterface' =&gt; [
'handler' =&gt; '\Filegator\Services\Auth\Adapters\Database',
'config' =&gt; [
@@ -137,7 +137,6 @@ VALUES
'database' =&gt; 'filegator',
],
],</code></pre>
<p>Don't forget to enter correct database details.</p>
</section>
</div>