From 6236e7cb8d0bd38f741d988cc5241a7b37069555 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 25 Apr 2018 00:21:59 +0200 Subject: [PATCH] login: store user data in /profile directory Dedicate /login to related pages, avoiding conflicts with user names. --- .gitignore | 3 +++ auth.inc.php | 2 +- login.php | 2 +- login.inc.php => login/form.inc.php | 0 login.html => login/index.html | 0 5 files changed, 5 insertions(+), 2 deletions(-) rename login.inc.php => login/form.inc.php (100%) rename login.html => login/index.html (100%) diff --git a/.gitignore b/.gitignore index 44375b5..a99a8c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ # link to some ckeditor build (or checkout in a pinch) /ckeditor + +# dynamic user data +/profile diff --git a/auth.inc.php b/auth.inc.php index 48b81fc..4916ab1 100644 --- a/auth.inc.php +++ b/auth.inc.php @@ -22,7 +22,7 @@ function login($inuser, $inpass = NULL) } # find password data by user name - $userdir = 'login/'.strtolower($inuser); + $userdir = 'profile/'.strtolower($inuser); $pwfile = "$userdir/.passwd"; if (!file_exists($pwfile)) return; $usertest = trim(file_get_contents($pwfile)); diff --git a/login.php b/login.php index a5e834f..801ba1f 100644 --- a/login.php +++ b/login.php @@ -17,7 +17,7 @@ elseif (isset($_GET['logout'])) { if (empty($User)) { ob_clean(); - require_once 'login.inc.php'; + require_once 'login/form.inc.php'; $part = ['warn' => $message]; print getoutput($part); return TRUE; diff --git a/login.inc.php b/login/form.inc.php similarity index 100% rename from login.inc.php rename to login/form.inc.php diff --git a/login.html b/login/index.html similarity index 100% rename from login.html rename to login/index.html -- 2.30.0