diff options
| author | 2016-10-22 12:58:06 +0200 | |
|---|---|---|
| committer | 2016-10-22 12:58:06 +0200 | |
| commit | e1f214e9e2e09a83a9920e33fbf617dfe48fbb7e (patch) | |
| tree | 916b23c04ce53891e8d9e2af6ed413c7f7379491 /lib/lib_rss.php | |
| parent | 40b5d3f933e27f37894f58f99c63409f2cdd2d5a (diff) | |
CLI list-users and create-user
https://github.com/FreshRSS/FreshRSS/issues/1095
https://github.com/FreshRSS/FreshRSS/issues/1090
Diffstat (limited to 'lib/lib_rss.php')
| -rw-r--r-- | lib/lib_rss.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 75046fd54..143b55bee 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -282,9 +282,12 @@ function uSecString() { return str_pad($t['usec'], 6, '0'); } -function invalidateHttpCache() { - Minz_Session::_param('touch', uTimeString()); - return touch(join_path(DATA_PATH, 'users', Minz_Session::param('currentUser', '_'), 'log.txt')); +function invalidateHttpCache($username = '') { + if (($username == '') || (!ctype_alnum($username))) { + Minz_Session::_param('touch', uTimeString()); + $username = Minz_Session::param('currentUser', '_'); + } + return touch(join_path(DATA_PATH, 'users', $username, 'log.txt')); } function listUsers() { |
