diff --git a/configuration/auth.html b/configuration/auth.html index a66933d..3dcf507 100644 --- a/configuration/auth.html +++ b/configuration/auth.html @@ -108,8 +108,8 @@ ],
You can also mysql database to store your users.
-First, create a table users
with this sql:
You can also use mysql database to store your users.
+First, create a table users
with this sql query:
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;
-Then, import default users with this query:
+Then, import default users with sql query:
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');
-At the end, open configuration.php
and update AuthInterface handler to:
At the end, open configuration.php
and update AuthInterface handler to reflect your database settings:
'Filegator\Services\Auth\AuthInterface' => [
'handler' => '\Filegator\Services\Auth\Adapters\Database',
'config' => [
@@ -137,7 +137,6 @@ VALUES
'database' => 'filegator',
],
],
-Don't forget to enter correct database details.