From 8ffa896e68d05403cd65bd7b1ca3d4657347c10a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 28 Dec 2013 01:01:31 +0100 Subject: Liste d'utilisateurs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contribue à https://github.com/marienfressinaud/FreshRSS/issues/126 --- app/i18n/en.php | 7 ++++--- app/i18n/fr.php | 7 ++++--- app/views/configure/users.phtml | 16 ++++++++++++++++ lib/lib_rss.php | 12 ++++++++++++ 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/app/i18n/en.php b/app/i18n/en.php index 7c4f090ae..c7ac16ae0 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -162,9 +162,10 @@ return array ( 'allow_anonymous' => 'Allow anonymous reading', 'auth_token' => 'Authentication token', 'explain_token' => 'Allows to access RSS output without authentication.
%s?token=%s', - 'login_configuration' => 'Login', - 'is_admin' => 'is administrator', - 'auth_type' => 'Authentication method', + 'login_configuration' => 'Login', + 'is_admin' => 'is administrator', + 'auth_type' => 'Authentication method', + 'users_list' => 'List of users', 'language' => 'Language', 'month' => 'months', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 9dff6dd33..e8da1c603 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -162,9 +162,10 @@ return array ( 'allow_anonymous' => 'Autoriser la lecture anonyme', 'auth_token' => 'Jeton d’identification', 'explain_token' => 'Permet d’accéder à la sortie RSS sans besoin de s’authentifier.
%s?output=rss&token=%s', - 'login_configuration' => 'Identification', - 'is_admin' => 'est administrateur', - 'auth_type' => 'Méthode d’authentification', + 'login_configuration' => 'Identification', + 'is_admin' => 'est administrateur', + 'auth_type' => 'Méthode d’authentification', + 'users_list' => 'Liste des utilisateurs', 'language' => 'Langue', 'month' => 'mois', diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml index 81e551d95..e6bebc77c 100644 --- a/app/views/configure/users.phtml +++ b/app/views/configure/users.phtml @@ -39,6 +39,22 @@ + + +
+ +
+ + (not implemented yet) +
+
+ + +
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 160a65bbf..c7698b5c5 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -176,3 +176,15 @@ function uSecString() { function invalidateHttpCache() { file_put_contents(DATA_PATH . '/touch.txt', uTimeString()); } + +function usernameFromPath($userPath) { + if (preg_match('%/([a-z0-9]{1,16})_user\.php$%', $userPath, $matches)) { + return $matches[1]; + } else { + return ''; + } +} + +function listUsers() { + return array_map('usernameFromPath', glob(DATA_PATH . '/*_user.php')); +} -- cgit v1.2.3