diff options
| author | 2013-12-28 01:01:31 +0100 | |
|---|---|---|
| committer | 2013-12-28 01:01:31 +0100 | |
| commit | 8ffa896e68d05403cd65bd7b1ca3d4657347c10a (patch) | |
| tree | 56d1543df5d25b11669c29aabdb7be11206084f1 /lib | |
| parent | 2063f967c63cab8bed30c8db44490a6531d4cb5d (diff) | |
Liste d'utilisateurs
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/126
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/lib_rss.php | 12 |
1 files changed, 12 insertions, 0 deletions
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')); +} |
