I've written a multiuser system that doesn't use the built-in login.
For everyone who is waiting for the official update where the multiuser system will be released.

- Remember, if you update Files app, you will lose any changes you made to index.php
- Please keep in mind, the "ROOT" of the main script (config file) is after the modification not longer working
- The main login, is working! That means you should disable it.
You are wondering how do I install the script?
https://www.codepile.net/pile/BqM6k6YQ
Add users by adding this line to "login.php"
array_push($users, array("username" => "USERNAME", "password" => "PASSWORD","root" => "ROOT"));
You define a new user with "USERNAME", "PASSWORD" and "ROOT
Username and password is logical but what does root do?
"ROOT" acts like the original "ROOT" in the script. That means you have to create folders for each user which are the same as the defined "ROOT" for each user.
The structure for this example would look like this:
../
├─ demo/
├─ user/
├─ _files/
├─ index.php
├─ login.php
- Now we have to make some changes in the "index.php" file.
- Add following code above the line "class config {" :
session_start();
if (!isset($_SESSION["user"])) {
header("Location: login.php");
exit();
}
This checks if the user is logged in!
- Replace the line "self::$root = real_path(self::$config['root']);" with:
if(isset($_SESSION["root"])){
self::$root = real_path($_SESSION["root"]);
}else{
self::$root = real_path(self::$config['root']);
}
This rewrites the "ROOT" with the logged in users "ROOT"!
- Add underneath "<div id="sidebar-topbar"></div>":
<div style="position: absolute; top: 15px; right: 10px;><a href="login.php?logout"><svg fill="#cfd8dd" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="26px" height="26px"><path d="M 16 3 C 8.832031 3 3 8.832031 3 16 C 3 23.167969 8.832031 29 16 29 C 23.167969 29 29 23.167969 29 16 C 29 12.417969 27.539063 9.164063 25.1875 6.8125 L 27 5 L 21 4 L 22 10 L 23.78125 8.21875 C 25.769531 10.210938 27 12.957031 27 16 C 27 22.085938 22.085938 27 16 27 C 9.914063 27 5 22.085938 5 16 C 5 9.914063 9.914063 5 16 5 Z M 16 8 C 13.25 8 11 10.25 11 13 C 11 14.515625 11.707031 15.863281 12.78125 16.78125 C 10.53125 17.949219 9 20.300781 9 23 L 11 23 C 11 20.226563 13.226563 18 16 18 C 18.773438 18 21 20.226563 21 23 L 23 23 C 23 20.300781 21.46875 17.949219 19.21875 16.78125 C 20.292969 15.863281 21 14.515625 21 13 C 21 10.25 18.75 8 16 8 Z M 16 10 C 17.667969 10 19 11.332031 19 13 C 19 14.667969 17.667969 16 16 16 C 14.332031 16 13 14.667969 13 13 C 13 11.332031 14.332031 10 16 10 Z"/></svg></a></div>
This adds a logout button in the sidebar!

For sure, this is not the cleanest and professional solution, but it helped me to mange my family members in my home server😀
Best wishes, Marco